绑定的数据类型错误
vue.runtime.esm.js?2b0e:619
[Vue warn]: Invalid prop: type check failed for prop "router". Expected Boolean, got String with value "true".
found in
---> <ElMenu> at packages/menu/src/menu.vue
<Smenu> at src/components/student/Smenu.vue
<ElAside> at packages/aside/src/main.vue
<ElContainer> at packages/container/src/main.vue... (1 recursive calls)
<Home> at src/view/Home.vue
<App> at src/App.vue
<Root>
原因:绑定的数据类型错误
原来代码是这样的:
<el-menu
router='true'
>
更正后应该这样的:(别忘了前面有冒号
,即v-bind
的缩写)
<el-menu
:router='true' //或者 :router=true
>