Commit c8e84dc14e4578ff5828364b93149f0f177c8e58
1 parent
15567e47
chore: typo
Showing
7 changed files
with
19 additions
and
13 deletions
package.json
@@ -97,7 +97,7 @@ | @@ -97,7 +97,7 @@ | ||
97 | "stylelint-order": "^4.1.0", | 97 | "stylelint-order": "^4.1.0", |
98 | "ts-node": "^9.1.1", | 98 | "ts-node": "^9.1.1", |
99 | "typescript": "4.1.5", | 99 | "typescript": "4.1.5", |
100 | - "vite": "2.0.4", | 100 | + "vite": "^2.0.4", |
101 | "vite-plugin-compression": "^0.2.2", | 101 | "vite-plugin-compression": "^0.2.2", |
102 | "vite-plugin-html": "^2.0.2", | 102 | "vite-plugin-html": "^2.0.2", |
103 | "vite-plugin-imagemin": "^0.2.8", | 103 | "vite-plugin-imagemin": "^0.2.8", |
src/hooks/web/useI18n.ts
@@ -40,7 +40,7 @@ export function useI18n( | @@ -40,7 +40,7 @@ export function useI18n( | ||
40 | 40 | ||
41 | const tFn: I18nGlobalTranslation = (key: string, ...arg: any[]) => { | 41 | const tFn: I18nGlobalTranslation = (key: string, ...arg: any[]) => { |
42 | if (!key) return ''; | 42 | if (!key) return ''; |
43 | - if (!key.includes('.')) return key; | 43 | + if (!key.includes('.') && !namespace) return key; |
44 | return t(getKey(namespace, key), ...(arg as I18nTranslationRestParameters)); | 44 | return t(getKey(namespace, key), ...(arg as I18nTranslationRestParameters)); |
45 | }; | 45 | }; |
46 | return { | 46 | return { |
src/layouts/default/tabs/index.vue
@@ -91,7 +91,7 @@ | @@ -91,7 +91,7 @@ | ||
91 | const isHide = !hideTab ? null : currentActiveMenu; | 91 | const isHide = !hideTab ? null : currentActiveMenu; |
92 | const p = isHide || fullPath || path; | 92 | const p = isHide || fullPath || path; |
93 | if (activeKeyRef.value !== p) { | 93 | if (activeKeyRef.value !== p) { |
94 | - activeKeyRef.value = p; | 94 | + activeKeyRef.value = p as string; |
95 | } | 95 | } |
96 | 96 | ||
97 | if (isHide) { | 97 | if (isHide) { |
src/router/menus/index.ts
@@ -99,7 +99,7 @@ function basicFilter(routes: RouteRecordNormalized[]) { | @@ -99,7 +99,7 @@ function basicFilter(routes: RouteRecordNormalized[]) { | ||
99 | }); | 99 | }); |
100 | 100 | ||
101 | if (!matchRoute) return false; | 101 | if (!matchRoute) return false; |
102 | - menu.icon = menu.icon || matchRoute.meta.icon; | 102 | + menu.icon = (menu.icon || matchRoute.meta.icon) as string; |
103 | menu.meta = matchRoute.meta; | 103 | menu.meta = matchRoute.meta; |
104 | return true; | 104 | return true; |
105 | }; | 105 | }; |
src/store/modules/tab.ts
@@ -124,7 +124,7 @@ class Tab extends VuexModule { | @@ -124,7 +124,7 @@ class Tab extends VuexModule { | ||
124 | const { path, fullPath, params, query } = route; | 124 | const { path, fullPath, params, query } = route; |
125 | 125 | ||
126 | let updateIndex = -1; | 126 | let updateIndex = -1; |
127 | - // 已经存在的页面,不重复添加tab | 127 | + // Existing pages, do not add tabs repeatedly |
128 | const hasTab = this.tabsState.some((tab, index) => { | 128 | const hasTab = this.tabsState.some((tab, index) => { |
129 | updateIndex = index; | 129 | updateIndex = index; |
130 | return (tab.fullPath || tab.path) === (fullPath || path); | 130 | return (tab.fullPath || tab.path) === (fullPath || path); |
vite.config.ts
@@ -91,7 +91,13 @@ export default ({ command, mode }: ConfigEnv): UserConfig => { | @@ -91,7 +91,13 @@ export default ({ command, mode }: ConfigEnv): UserConfig => { | ||
91 | 91 | ||
92 | optimizeDeps: { | 92 | optimizeDeps: { |
93 | // @iconify/iconify: The dependency is dynamically and virtually loaded by @purge-icons/generated, so it needs to be specified explicitly | 93 | // @iconify/iconify: The dependency is dynamically and virtually loaded by @purge-icons/generated, so it needs to be specified explicitly |
94 | - include: ['@iconify/iconify'], | 94 | + include: [ |
95 | + '@iconify/iconify', | ||
96 | + 'ant-design-vue/es/locale/zh_CN', | ||
97 | + 'moment/dist/locale/zh-cn', | ||
98 | + 'ant-design-vue/es/locale/en_US', | ||
99 | + 'moment/dist/locale/eu', | ||
100 | + ], | ||
95 | exclude: ['vue-demi'], | 101 | exclude: ['vue-demi'], |
96 | }, | 102 | }, |
97 | }; | 103 | }; |
yarn.lock
@@ -6985,9 +6985,9 @@ postcss@^7.0.14, postcss@^7.0.17, postcss@^7.0.2, postcss@^7.0.21, postcss@^7.0. | @@ -6985,9 +6985,9 @@ postcss@^7.0.14, postcss@^7.0.17, postcss@^7.0.2, postcss@^7.0.21, postcss@^7.0. | ||
6985 | supports-color "^6.1.0" | 6985 | supports-color "^6.1.0" |
6986 | 6986 | ||
6987 | postcss@^8.2.1: | 6987 | postcss@^8.2.1: |
6988 | - version "8.2.4" | ||
6989 | - resolved "https://registry.npmjs.org/postcss/-/postcss-8.2.4.tgz#20a98a39cf303d15129c2865a9ec37eda0031d04" | ||
6990 | - integrity sha512-kRFftRoExRVXZlwUuay9iC824qmXPcQQVzAjbCCgjpXnkdMCJYBu2gTwAaFBzv8ewND6O8xFb3aELmEkh9zTzg== | 6988 | + version "8.2.6" |
6989 | + resolved "https://registry.npmjs.org/postcss/-/postcss-8.2.6.tgz#5d69a974543b45f87e464bc4c3e392a97d6be9fe" | ||
6990 | + integrity sha512-xpB8qYxgPuly166AGlpRjUdEYtmOWx2iCwGmrv4vqZL9YPVviDVPZPRXxnXr6xPZOdxQ9lp3ZBFCRgWJ7LE3Sg== | ||
6991 | dependencies: | 6991 | dependencies: |
6992 | colorette "^1.2.1" | 6992 | colorette "^1.2.1" |
6993 | nanoid "^3.1.20" | 6993 | nanoid "^3.1.20" |
@@ -7518,9 +7518,9 @@ rollup@^2.25.0: | @@ -7518,9 +7518,9 @@ rollup@^2.25.0: | ||
7518 | fsevents "~2.1.2" | 7518 | fsevents "~2.1.2" |
7519 | 7519 | ||
7520 | rollup@^2.38.5: | 7520 | rollup@^2.38.5: |
7521 | - version "2.38.5" | ||
7522 | - resolved "https://registry.npmjs.org/rollup/-/rollup-2.38.5.tgz#be41ad4fe0c103a8794377afceb5f22b8f603d6a" | ||
7523 | - integrity sha512-VoWt8DysFGDVRGWuHTqZzT02J0ASgjVq/hPs9QcBOGMd7B+jfTr/iqMVEyOi901rE3xq+Deq66GzIT1yt7sGwQ== | 7521 | + version "2.40.0" |
7522 | + resolved "https://registry.npmjs.org/rollup/-/rollup-2.40.0.tgz#efc218eaede7ab590954df50f96195188999c304" | ||
7523 | + integrity sha512-WiOGAPbXoHu+TOz6hyYUxIksOwsY/21TRWoO593jgYt8mvYafYqQl+axaA8y1z2HFazNUUrsMSjahV2A6/2R9A== | ||
7524 | optionalDependencies: | 7524 | optionalDependencies: |
7525 | fsevents "~2.3.1" | 7525 | fsevents "~2.3.1" |
7526 | 7526 | ||
@@ -8982,7 +8982,7 @@ vite-plugin-windicss@0.6.2: | @@ -8982,7 +8982,7 @@ vite-plugin-windicss@0.6.2: | ||
8982 | "@windicss/plugin-utils" "0.6.2" | 8982 | "@windicss/plugin-utils" "0.6.2" |
8983 | windicss "^2.2.0" | 8983 | windicss "^2.2.0" |
8984 | 8984 | ||
8985 | -vite@2.0.4: | 8985 | +vite@^2.0.4: |
8986 | version "2.0.4" | 8986 | version "2.0.4" |
8987 | resolved "https://registry.npmjs.org/vite/-/vite-2.0.4.tgz#063532a4139b59a067297d8ebb5960d450907a09" | 8987 | resolved "https://registry.npmjs.org/vite/-/vite-2.0.4.tgz#063532a4139b59a067297d8ebb5960d450907a09" |
8988 | integrity sha512-+PP89D7AKXFE4gps8c5+4eP5yXTh5qCogjdYX7iSsIxbLZAa26JoGSq6OLk0qdb/fqDh7gtJqGiLbG2V6NvkKQ== | 8988 | integrity sha512-+PP89D7AKXFE4gps8c5+4eP5yXTh5qCogjdYX7iSsIxbLZAa26JoGSq6OLk0qdb/fqDh7gtJqGiLbG2V6NvkKQ== |