vue项目菜单栏左侧展开,浏览器报错Invalid prop: type check failed for prop "index". Expected String with value "125", got Number with value 125.

菜单栏左侧展开,浏览器报错Invalid prop: type check failed for prop "index". Expected String with value "125", got Number with value 125.

是因为 index只能接受字符串, :index="item.id" 改成字符串形式 就可以::index="item.id+''

ok 啦

posted @ 2022-10-04 22:25  Mahmud(مەھمۇد)  阅读(110)  评论(0编辑  收藏  举报