problem description
RT, secondary setting rendering will turn the children into that component. No matter what level 3 is set, it has always been a rendering HelloWorld component. Is there something wrong with my configuration?
related codes
template
<el-menu :default-active="activeMenuIndex" class="el-menu-vertical-demo"
background-color="-sharp22205f" text-color="-sharpfff" active-text-color="-sharpff9c02"
router>
<el-menu-item v-for="item1 in menuData" :key="item1.path" :index="item1.path"
v-if="item1.children==undefined">
<i :class="item1.icon">
</i>
<span>
{{item1.name}}
</span>
</el-menu-item>
<el-submenu v-for="item2 in menuData" :key="item2.path" :index="item2.path"
v-if="item2.children!=undefined">
<template slot="title">
<i :class="item2.icon">
</i>
<span>
{{item2.name}}
</span>
</template>
<el-menu-item v-for="item3 in item2.children" :key="item3.path" :index="item3.path"
v-if="item3.children==undefined">
{{item3.name}}
</el-menu-item>
<el-submenu v-for="item4 in item2.children" :key="item4.path" :index="item4.path"
v-if="item4.children!=undefined">
<template slot="title">
{{item4.name}}
</template>
<el-menu-item v-for="item5 in item4.children" :key="item5.path" :index="item5.path">
{{item5.name}}
</el-menu-item>
</el-submenu>
</el-submenu>
</el-menu>
routing:
{
path: "/nhsj",
name: "",
icon: "fas fa-burn",
component: HelloWorld,
children: [{
path: "/nhsj/nhgs",
name: "",
component: HelloWorld,
}, {
path: "/nhsj/nhsj",
name: "",
component: HelloWorld,
}, {
path: "/nhsj/nhfx",
name: "",
component: HelloWorld,
children: [{
path: "/nhsj/nhfx/nnytj",
name: "",
component: a1,
}, {
path: "/nhsj/nhfx/ynytj",
name: "",
component: HelloWorld,
}, {
path: "/nhsj/nhfx/nydb",
name: "",
component: HelloWorld,
}, {
path: "/nhsj/nhfx/fgzsjnydb",
name: "",
component: HelloWorld,
}, {
path: "/nhsj/nhfx/nyfl",
name: "",
component: HelloWorld,
}]
}, {
path: "/nhsj/nhkh",
name: "",
component: HelloWorld,
}]
}
what result do you expect? What is the error message actually seen?
specify the component based on my route rendering. Now level 3 only renders helloword, II only components of the first level menu.