Bootstrap

vue学习day1(记录学习难点)动态绑定导航

el-menu 启用router模式

激活导航

遍历循环出路由

动态index循环子级菜单

 <el-menu
            class="el-menu-vertical-demo"
            @open="handleOpen"
            @close="handleClose"
            router
          >
            <el-submenu
              index="1"
              v-for="(item, index) in this.$router.options.routes"
              :key="index"
              v-if="!item.hidden"
            >
              <template slot="title">
                <i class="el-icon-location"></i>
                <span>{{ item.name }}</span>
              </template>

              <el-menu-item
                :index="children.path"
                v-for="(children,indexj) in item.children"
                >{{ children.name }}</el-menu-item
              >
            </el-submenu>
          </el-menu>

;