Error screenshot:
wrong reason:
The index value type of the menu component in element-ui must be a string type. I bound the index property and assigned it to a num value type, so an error was reported.
<el- submenu :index ="index + 1" :key ="index" v - for ="(item, index) in menus"></el-submenu>
solution:
Just change the value of the :index attribute to a string type,
<el- submenu :index ="index + 1 +''" :key ="index" v - for ="(item, index) in menus"></el-submenu>
Perfect solution:
Similar Posts:
- Four ways to solve selenium’s error “element is not clickable at point…”
- [Vue warn]: Invalid prop: type check failed for prop “index”. Expected String with value “1”, got Number with value 1.
- [Solved] Open quote is expected for attribute “name” associ
- Invalid prop: type check failed for prop value
- [Solved] Vue error: (Avoid using non-primitive value as key, use stringnumber value instead.)
- How to Solve Error: Cannot read property ‘map’ of undefined
- Vue3 vue.draggable slot jsx Error: Error: draggable element must have an item slot
- [Solved] ant Error: Cannot use ‘in’ operator to search for ‘value’ in undefined
- Front end development: solve the problem of emitted value instead of an instance of error in Vue project
- Invalid prop: type check failed for prop “value”. Expected String, Number, got Object found in