Pārlūkot izejas kodu

【修改】部分一级路由加后缀/index

howie 2 gadi atpakaļ
vecāks
revīzija
4627caa950
1 mainītis faili ar 5 papildinājumiem un 1 dzēšanām
  1. 5 1
      src/views/dashboard/index.vue

+ 5 - 1
src/views/dashboard/index.vue

@@ -54,7 +54,7 @@
               <el-link
                 class="link"
                 :underline="false"
-                @click="clickMenu(item.curUrl + '/index')"
+                @click="clickMenu(item.curUrl)"
               >{{ item.moduleName }}</el-link>
             </div>
           </div>
@@ -602,6 +602,10 @@ export default {
 
     // 点击菜单
     clickMenu(path) {
+      const curlArr = ['/notice', '/issue']
+      if (curlArr.includes(path)) {
+        path += '/index'
+      }
       this.$router.push({
         path
       })