Sfoglia il codice sorgente

修复点击新建Api keys/webhooks页面,菜单栏会选中ducumentation

liyangbin 2 anni fa
parent
commit
75ec62359c
1 ha cambiato i file con 13 aggiunte e 3 eliminazioni
  1. 13 3
      src/components/common/Aside.vue

+ 13 - 3
src/components/common/Aside.vue

@@ -15,7 +15,7 @@
             <span>Projects</span>
           </template>
           <el-menu-item index="/dashboard">Dashboard</el-menu-item>
-          <el-menu-item index="/api/keys">API Keys</el-menu-item>
+          <el-menu-item :index="'/api/keys'||'/api/keys/new-project'||'api/keys/edit-project'">API Keys</el-menu-item>
           <el-menu-item index="/user/webhooks">Webhooks</el-menu-item>
         </el-submenu>
         <el-submenu index="2">
@@ -37,7 +37,7 @@
             <Support />
             <span>Support</span>
           </template>
-          <el-menu-item>
+          <el-menu-item index="">
             <a href="/download/ComPDFKit-SaaS-API.md" download="compdfkit-saas-api.md" style="color:rgb(102, 102, 102)">
               Documentation
             </a>
@@ -93,7 +93,17 @@ import Support from '@/components/icon/menu_support.vue'
 export default class Aside extends Vue {
   userName = loginStore().user.name
   get path () {
-    return this.$route.path
+    if (this.$route.path === '/api/keys/new-project') {
+      return '/api/keys'
+    } else if (this.$route.path.indexOf('api/keys/edit-project') !== -1) {
+      return '/api/keys'
+    } else if (this.$route.path === '/user/webhooks/new-webhook') {
+      return '/user/webhooks'
+    } else if (this.$route.path.indexOf('/user/webhooks/edit-webhook') !== -1) {
+      return '/user/webhooks'
+    } else {
+      return this.$route.path
+    }
   }
 }
 </script>