Browse Source

fix: delete realPath

xiaoxian521 3 năm trước cách đây
mục cha
commit
903e298951

+ 0 - 1
mock/asyncRoutes.ts

@@ -99,7 +99,6 @@ const tabsRouter = {
         showLink: false,
         i18n: false,
         dynamicLevel: 3,
-        realPath: "/tabs/detail",
         refreshRedirect: "/tabs/index"
       }
     }

+ 1 - 3
src/plugins/element-plus/index.ts

@@ -44,7 +44,6 @@ import {
   ElCollapse,
   ElCollapseItem,
   ElTreeV2,
-  ElColorPicker,
   // 指令
   ElLoading,
   ElInfiniteScroll
@@ -97,8 +96,7 @@ const components = [
   ElEmpty,
   ElCollapse,
   ElCollapseItem,
-  ElTreeV2,
-  ElColorPicker
+  ElTreeV2
 ];
 
 // https://element-plus.org/zh-CN/component/icon.html

+ 1 - 5
src/router/utils.ts

@@ -216,11 +216,7 @@ const addAsyncRoutes = (arrRoutes: Array<RouteRecordRaw>) => {
     if (v.redirect) {
       v.component = Layout;
     } else {
-      if (v.meta.realPath) {
-        v.component = modulesRoutes[`/src/views${v.meta.realPath}/index.vue`];
-      } else {
-        v.component = modulesRoutes[`/src/views${v.path}/index.vue`];
-      }
+      v.component = modulesRoutes[`/src/views${v.path}/index.vue`];
     }
     if (v.children) {
       addAsyncRoutes(v.children);

+ 1 - 2
src/views/tabs/index/index.vue

@@ -17,8 +17,7 @@ function toDetail(index: number) {
       title: { zh: `No.${index} - 详情信息`, en: `No.${index} - DetailInfo` },
       showLink: false,
       i18n: false,
-      dynamicLevel: 3,
-      realPath: "/tabs/detail"
+      dynamicLevel: 3
     }
   });
   router.push({ name: "tabDetail", query: { id: String(index) } });