uses Element"s navMenu. The list was taken back from backstage.
<el-submenu index="" v-for="(item,index) in rightBarList" :key="index">
the index in the el-submenu above can only be written like this. If I write: index, it will be wrong.
<el-menu class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" :router="true" :unique-opened="uniqueOpened" :default-openeds="openeds">
<el-submenu index="index" v-for="(item,index) in rightBarList" :key="index">
<template slot="title">
<i class="el-icon-location"></i>
<span slot="title">{{item.name}}</span>
</template>
<el-menu-item-group>
<el-menu-item :index="subItem.url" v-for="subItem in item.childrenMenus" :key="subItem.id">
{{subItem.name}}
</el-menu-item>
</el-menu-item-group>
</el-submenu>
</el-menu>
I see in the official document < el-submenu index= "1" v talk for = "(item,index) in rightBarList": key= "index" >
the index in the official document is written like this: 1, 2, 3, respectively.
what should I say if I want to represent the index loop here