diff --git a/build/vite/plugins/index.ts b/build/vite/plugins/index.ts index 1595839..d2119b0 100644 --- a/build/vite/plugins/index.ts +++ b/build/vite/plugins/index.ts @@ -6,7 +6,7 @@ import type { PluginOption } from 'vite'; import vue from '@vitejs/plugin-vue'; import vueJsx from '@vitejs/plugin-vue-jsx'; -import vueSetupExtend from 'vite-plugin-vue-setup-extend'; +// import vueSetupExtend from 'vite-plugin-vue-setup-extend'; import { ConfigSvgIconsPlugin } from './svgIcons'; import { AutoRegistryComponents } from './component'; import { AutoImportDeps } from './autoImport'; @@ -28,7 +28,7 @@ export function createVitePlugins(env: ViteEnv, isBuild: boolean) { // JSX支持 vueJsx(), // setup语法糖组件名支持 - vueSetupExtend(), + // vueSetupExtend(), ]; // 自动按需引入组件 diff --git a/package.json b/package.json index 62741fa..d05cd79 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "commit": "git add . && git-cz" }, "dependencies": { + "@nutui/icons-vue": "^0.0.26", "@nutui/nutui": "^4.0.5", "@varlet/ui": "^2.9.6", "@vueuse/core": "10.0.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0324325..670132d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,6 +5,9 @@ overrides: gifsicle: 5.2.0 dependencies: + '@nutui/icons-vue': + specifier: ^0.0.26 + version: 0.0.26 '@nutui/nutui': specifier: ^4.0.5 version: 4.0.5(unplugin-vue-components@0.24.1) @@ -3752,11 +3755,6 @@ packages: /decimal.js@10.4.3: resolution: {integrity: sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==} - /decode-uri-component@0.2.0: - resolution: {integrity: sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og==} - engines: {node: '>=0.10'} - dev: true - /decode-uri-component@0.2.2: resolution: {integrity: sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==} engines: {node: '>=0.10'} @@ -4568,7 +4566,7 @@ packages: dependencies: acorn: 8.8.2 acorn-jsx: 5.3.2(acorn@8.8.2) - eslint-visitor-keys: 3.3.0 + eslint-visitor-keys: 3.4.0 dev: true /espree@9.5.1: @@ -5246,7 +5244,7 @@ packages: dir-glob: 3.0.1 fast-glob: 3.2.12 glob: 7.2.0 - ignore: 5.2.0 + ignore: 5.2.4 merge2: 1.4.1 slash: 3.0.0 dev: true @@ -5544,11 +5542,6 @@ packages: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} dev: true - /ignore@5.2.0: - resolution: {integrity: sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==} - engines: {node: '>= 4'} - dev: true - /ignore@5.2.4: resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} engines: {node: '>= 4'} @@ -8142,7 +8135,7 @@ packages: deprecated: See https://github.com/lydell/source-map-resolve#deprecated dependencies: atob: 2.1.2 - decode-uri-component: 0.2.0 + decode-uri-component: 0.2.2 resolve-url: 0.2.1 source-map-url: 0.4.1 urix: 0.1.0 diff --git a/src/router/routes.ts b/src/router/routes.ts index 2f4104e..5e87021 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -56,6 +56,12 @@ export const routes = [ keepAlive: true, }, }, + // 匹配不到重定向会主页 + { + // 找不到路由重定向到404页面 + path: '/:pathMatch(.*)', + redirect: '/Home', + }, ]; export default routes;