提交 c8e84dc1 编写于 作者: V Vben

chore: typo

上级 15567e47
...@@ -40,7 +40,7 @@ export function useI18n( ...@@ -40,7 +40,7 @@ export function useI18n(
const tFn: I18nGlobalTranslation = (key: string, ...arg: any[]) => { const tFn: I18nGlobalTranslation = (key: string, ...arg: any[]) => {
if (!key) return ''; if (!key) return '';
if (!key.includes('.')) return key; if (!key.includes('.') && !namespace) return key;
return t(getKey(namespace, key), ...(arg as I18nTranslationRestParameters)); return t(getKey(namespace, key), ...(arg as I18nTranslationRestParameters));
}; };
return { return {
......
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
const isHide = !hideTab ? null : currentActiveMenu; const isHide = !hideTab ? null : currentActiveMenu;
const p = isHide || fullPath || path; const p = isHide || fullPath || path;
if (activeKeyRef.value !== p) { if (activeKeyRef.value !== p) {
activeKeyRef.value = p; activeKeyRef.value = p as string;
} }
if (isHide) { if (isHide) {
......
...@@ -99,7 +99,7 @@ function basicFilter(routes: RouteRecordNormalized[]) { ...@@ -99,7 +99,7 @@ function basicFilter(routes: RouteRecordNormalized[]) {
}); });
if (!matchRoute) return false; if (!matchRoute) return false;
menu.icon = menu.icon || matchRoute.meta.icon; menu.icon = (menu.icon || matchRoute.meta.icon) as string;
menu.meta = matchRoute.meta; menu.meta = matchRoute.meta;
return true; return true;
}; };
......
...@@ -124,7 +124,7 @@ class Tab extends VuexModule { ...@@ -124,7 +124,7 @@ class Tab extends VuexModule {
const { path, fullPath, params, query } = route; const { path, fullPath, params, query } = route;
let updateIndex = -1; let updateIndex = -1;
// 已经存在的页面,不重复添加tab // Existing pages, do not add tabs repeatedly
const hasTab = this.tabsState.some((tab, index) => { const hasTab = this.tabsState.some((tab, index) => {
updateIndex = index; updateIndex = index;
return (tab.fullPath || tab.path) === (fullPath || path); return (tab.fullPath || tab.path) === (fullPath || path);
......
...@@ -91,7 +91,13 @@ export default ({ command, mode }: ConfigEnv): UserConfig => { ...@@ -91,7 +91,13 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
optimizeDeps: { optimizeDeps: {
// @iconify/iconify: The dependency is dynamically and virtually loaded by @purge-icons/generated, so it needs to be specified explicitly // @iconify/iconify: The dependency is dynamically and virtually loaded by @purge-icons/generated, so it needs to be specified explicitly
include: ['@iconify/iconify'], include: [
'@iconify/iconify',
'ant-design-vue/es/locale/zh_CN',
'moment/dist/locale/zh-cn',
'ant-design-vue/es/locale/en_US',
'moment/dist/locale/eu',
],
exclude: ['vue-demi'], exclude: ['vue-demi'],
}, },
}; };
......
...@@ -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.
supports-color "^6.1.0" supports-color "^6.1.0"
postcss@^8.2.1: postcss@^8.2.1:
version "8.2.4" version "8.2.6"
resolved "https://registry.npmjs.org/postcss/-/postcss-8.2.4.tgz#20a98a39cf303d15129c2865a9ec37eda0031d04" resolved "https://registry.npmjs.org/postcss/-/postcss-8.2.6.tgz#5d69a974543b45f87e464bc4c3e392a97d6be9fe"
integrity sha512-kRFftRoExRVXZlwUuay9iC824qmXPcQQVzAjbCCgjpXnkdMCJYBu2gTwAaFBzv8ewND6O8xFb3aELmEkh9zTzg== integrity sha512-xpB8qYxgPuly166AGlpRjUdEYtmOWx2iCwGmrv4vqZL9YPVviDVPZPRXxnXr6xPZOdxQ9lp3ZBFCRgWJ7LE3Sg==
dependencies: dependencies:
colorette "^1.2.1" colorette "^1.2.1"
nanoid "^3.1.20" nanoid "^3.1.20"
...@@ -7518,9 +7518,9 @@ rollup@^2.25.0: ...@@ -7518,9 +7518,9 @@ rollup@^2.25.0:
fsevents "~2.1.2" fsevents "~2.1.2"
rollup@^2.38.5: rollup@^2.38.5:
version "2.38.5" version "2.40.0"
resolved "https://registry.npmjs.org/rollup/-/rollup-2.38.5.tgz#be41ad4fe0c103a8794377afceb5f22b8f603d6a" resolved "https://registry.npmjs.org/rollup/-/rollup-2.40.0.tgz#efc218eaede7ab590954df50f96195188999c304"
integrity sha512-VoWt8DysFGDVRGWuHTqZzT02J0ASgjVq/hPs9QcBOGMd7B+jfTr/iqMVEyOi901rE3xq+Deq66GzIT1yt7sGwQ== integrity sha512-WiOGAPbXoHu+TOz6hyYUxIksOwsY/21TRWoO593jgYt8mvYafYqQl+axaA8y1z2HFazNUUrsMSjahV2A6/2R9A==
optionalDependencies: optionalDependencies:
fsevents "~2.3.1" fsevents "~2.3.1"
...@@ -8982,7 +8982,7 @@ vite-plugin-windicss@0.6.2: ...@@ -8982,7 +8982,7 @@ vite-plugin-windicss@0.6.2:
"@windicss/plugin-utils" "0.6.2" "@windicss/plugin-utils" "0.6.2"
windicss "^2.2.0" windicss "^2.2.0"
vite@2.0.4: vite@^2.0.4:
version "2.0.4" version "2.0.4"
resolved "https://registry.npmjs.org/vite/-/vite-2.0.4.tgz#063532a4139b59a067297d8ebb5960d450907a09" resolved "https://registry.npmjs.org/vite/-/vite-2.0.4.tgz#063532a4139b59a067297d8ebb5960d450907a09"
integrity sha512-+PP89D7AKXFE4gps8c5+4eP5yXTh5qCogjdYX7iSsIxbLZAa26JoGSq6OLk0qdb/fqDh7gtJqGiLbG2V6NvkKQ== integrity sha512-+PP89D7AKXFE4gps8c5+4eP5yXTh5qCogjdYX7iSsIxbLZAa26JoGSq6OLk0qdb/fqDh7gtJqGiLbG2V6NvkKQ==
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册