Invalid prop: type check failed for prop “index“. Expected String | Null, got Number with value 1.

        Occurs when using the element component in a vue project.

<el-menu-item :index="item">
    {
   
   { item }}
</el-menu-item>

        Means the type check failed for property 'index'. Expected to be a string or a Null value, but got a value of type Number, so just convert the value of type Number to a value of type String.

Guess you like

Origin blog.csdn.net/h360583690/article/details/129073007