enilu / web-flash

web-flash -- Admin Framework and Mobile Website Based on Spring Boot and Vue.js
http://webflash.enilu.cn
MIT License
1.3k stars 365 forks source link

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

Closed makehaha closed 3 years ago

makehaha commented 3 years ago

最新的版本中,进入权限配置时树不显示,控制台报错: 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' }, 问题排除。
enilu commented 3 years ago

https://github.com/enilu/web-flash/commit/2b53f545e209874a514c5fd272ee990f5e22ced8