enilu/web-flash

系统管理->权限管理->权限配置报错

makehaha opened this issue · 1 comments

最新的版本中,进入权限配置时树不显示,控制台报错:
vue.runtime.esm.js:619 [Vue warn]: Property or method "defaultProps" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.

found in

---> at src/views/system/role/index.vue
at src/layout/components/AppMain.vue
at src/layout/index.vue
at src/App.vue

发现src/views/system/role/index.vue的133行定义了
:props="defaultProps">
但role.js中未定义。
在role.js 17行 data()返回中增加:

defaultProps: {
id: 'id',
label: 'name',
children: 'children'
},

问题排除。