Browse Source

perf: 同步精简版代码

i18n
xiaoxian521 3 years ago
parent
commit
a43d5ce865
  1. 2
      src/layout/hooks/nav.ts
  2. 2
      src/router/modules/error.ts
  3. 2
      src/router/modules/externalLink.ts
  4. 2
      src/router/modules/home.ts
  5. 2
      src/router/modules/remaining.ts
  6. 2
      src/router/utils.ts

2
src/layout/hooks/nav.ts

@ -5,9 +5,9 @@ import { routeMetaType } from "../types";
import { transformI18n } from "/@/plugins/i18n"; import { transformI18n } from "/@/plugins/i18n";
import { storageSession } from "/@/utils/storage"; import { storageSession } from "/@/utils/storage";
import { useAppStoreHook } from "/@/store/modules/app"; import { useAppStoreHook } from "/@/store/modules/app";
import { remainingPaths } from "/@/router/modules/index";
import { Title } from "../../../public/serverConfig.json"; import { Title } from "../../../public/serverConfig.json";
import { useEpThemeStoreHook } from "/@/store/modules/epTheme"; import { useEpThemeStoreHook } from "/@/store/modules/epTheme";
import { remainingPaths } from "/@/router/modules/index";
export function useNav() { export function useNav() {
const pureApp = useAppStoreHook(); const pureApp = useAppStoreHook();

2
src/router/modules/error.ts

@ -1,5 +1,5 @@
import { $t } from "/@/plugins/i18n"; import { $t } from "/@/plugins/i18n";
import Layout from "/@/layout/index.vue";
const Layout = () => import("/@/layout/index.vue");
const errorRouter = { const errorRouter = {
path: "/error", path: "/error",

2
src/router/modules/externalLink.ts

@ -1,5 +1,5 @@
import { $t } from "/@/plugins/i18n"; import { $t } from "/@/plugins/i18n";
import Layout from "/@/layout/index.vue";
const Layout = () => import("/@/layout/index.vue");
const externalLink = { const externalLink = {
path: "/external", path: "/external",

2
src/router/modules/home.ts

@ -1,5 +1,5 @@
import { $t } from "/@/plugins/i18n"; import { $t } from "/@/plugins/i18n";
import Layout from "/@/layout/index.vue";
const Layout = () => import("/@/layout/index.vue");
const homeRouter = { const homeRouter = {
path: "/", path: "/",

2
src/router/modules/remaining.ts

@ -1,5 +1,5 @@
import { $t } from "/@/plugins/i18n"; import { $t } from "/@/plugins/i18n";
import Layout from "/@/layout/index.vue";
const Layout = () => import("/@/layout/index.vue");
const remainingRouter = [ const remainingRouter = [
{ {

2
src/router/utils.ts

@ -8,11 +8,11 @@ import {
} from "vue-router"; } from "vue-router";
import { router } from "./index"; import { router } from "./index";
import { loadEnv } from "../../build"; import { loadEnv } from "../../build";
import Layout from "/@/layout/index.vue";
import { useTimeoutFn } from "@vueuse/core"; import { useTimeoutFn } from "@vueuse/core";
import { RouteConfigs } from "/@/layout/types"; import { RouteConfigs } from "/@/layout/types";
import { buildHierarchyTree } from "/@/utils/tree"; import { buildHierarchyTree } from "/@/utils/tree";
import { usePermissionStoreHook } from "/@/store/modules/permission"; import { usePermissionStoreHook } from "/@/store/modules/permission";
const Layout = () => import("/@/layout/index.vue");
// https://cn.vitejs.dev/guide/features.html#glob-import // https://cn.vitejs.dev/guide/features.html#glob-import
const modulesRoutes = import.meta.glob("/src/views/**/*.{vue,tsx}"); const modulesRoutes = import.meta.glob("/src/views/**/*.{vue,tsx}");

Loading…
Cancel
Save