Navigation Bar Recursive component reports an error
< template >
<el-submenu v-if="item.child && item.child.length" :index="navIndex">
<!-- -->
<template slot="title"><i v-if="item.icon" class="item.icon"></i>{{ item.name }}</template>
<!-- -->
<nav-bar-item v-for="(subItem,i) in item.child" :key="navIndex+"-"+i" :navIndex="navIndex+"-"+i" :item="subItem" ></nav-bar-item>
</el-submenu>
<el-menu-item v-else :index="item" :route="{path: item.url}" ><i v-if="item.icon" class="item.icon"></i>{{ item.name }}</el-menu-item>
< / template >
< script >
export default {
name: "NavBarItem",
props: ["item","navIndex"]
}
< / script >
call
< nav-bar-item vmurfort = "(item, index) in navList": item= "item": navIndex= "String (index)" > < / nav-bar-item >
in the parent component and keep reporting