jazz
2022-03-04 5dfa4aae98c53f1f3d5f8b9fa5308f359bfea104
src/layout/components/Sidebar/index.vue
@@ -33,7 +33,8 @@
    ]),
    routes() {
      let routes = this.$router.options.routes
      routes = this.jun_filterAuth(routes, this.getAuthDataFN())
      routes = this.jun_filterAuth(routes, () => {})
      // routes = this.jun_filterAuth(routes, this.getAuthDataFN())
      // console.log('this.getAuthDataFN()', this.getAuthDataFN())
      // console.log('$router.options.routes', this.$router.options.routes)
      // console.log('routes', routes)
@@ -64,7 +65,7 @@
      return menuData.filter((menu) => {
        // 仅有一级菜单
        if (!menu.children) {
          // isMock=1 全显示
          // mock模式 全显示
          if (isMock) return true
          // 不存在权限的话,默认显示
          // console.log(menu.auth, menu.auth ? !!authData[menu.auth] : true)
@@ -75,7 +76,7 @@
        if (menu.children.length) {
          // 递归
          menu.children = this.jun_filterAuth(menu.children, authData)
          // isMock=1 全显示
          // mock模式 全显示
          if (isMock) return true
          return menu.children.length
        }