<el-breadcrumb separator-class="el-icon-arrow-right">
            <el-breadcrumb-item v-for='v in breadcrumb' :key='v.name'>
                 {{v.meta.title}}
            </el-breadcrumb-item>
  </el-breadcrumb>
data(){
    retrun {
        menus: [],
        breadcrumb: [],
    }
},
        created() {
      if (!this.$store.state.routes[1].children) {
        this.$store.dispatch('asyncGetUserMenus').then(() => {
          this.menus = this.$router.options.routes[1].children
        })
      }

      this.menus = this.$router.options.routes[1].children

      this.breadcrumb = this.$route.matched
    },
    updated() {
      this.breadcrumb = this.$route.matched
    },

上一篇:C# 多线程和异步 (转发)


下一篇:javascript – SyntaxError:意外的令牌(用于开玩笑