* index:类型为字符串,在每一个el-menu-item组件上都有一个编号,给default-active标记 使用菜单栏进行路由跳转: <el-menu :default-active="this.$route.path"router mode="horizontal"><el-menu-itemv-for="(item,i) in navList":key="i":index="item.name">{{ item.navItem }}</el-menu-item><...
<el-menu-item index="2-4-3">选项3</el-menu-item> </el-submenu> </el-submenu> <el-menu-item index="3"disabled>消息中心</el-menu-item> <el-menu-item index="4">订单管理</el-menu-item> </el-menu> exportdefault{ data() { return{ activeIndex:'1' }; }, methods: { handle...
* index:类型为字符串,在每一个el-menu-item组件上都有一个编号,给default-active标记 使用菜单栏进行路由跳转: <el-menu :default-active="this.$router.path" router mode="horizontal"> <el-menu-item v-for="(item,i) in navList" :key="i" :index="item.name"> {{ item.navItem }} </el-...