From e76411fc7c3ed8e3cdb37ad79a88309951ba49e8 Mon Sep 17 00:00:00 2001 From: "HOMEDO\\zhangjiayun" Date: Fri, 26 Aug 2022 13:54:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8E=BB=E9=99=A4VueI18nPlugin=E4=BB=A5?= =?UTF-8?q?=E8=AE=A9Vue18n=E5=85=B6=E6=94=AF=E6=8C=81=E5=86=85=E8=81=94=20?= =?UTF-8?q?JavaScript=20=E5=AD=97=E7=AC=A6=E4=B8=B2=E7=9A=84=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 - src/views/login/index.vue | 2 +- vite.config.ts | 12 ++++++------ 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index ef5a45a9..cfa2b650 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,6 @@ "@babel/eslint-parser": "^7.18.9", "@commitlint/cli": "^17.0.3", "@commitlint/config-conventional": "^17.0.3", - "@intlify/unplugin-vue-i18n": "^0.5.0", "@release-it/conventional-changelog": "^5.0.0", "@types/jquery": "^3.5.14", "@types/js-cookie": "^3.0.2", diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 84ade8dc..da71bb08 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -69,7 +69,7 @@ const rules = computed(() => ({ { min: 6, max: 12, - message: t('长度必须 在 {0} 到 {1}个字符之间', [6, 12]), + message: t('长度必须在 {0} 到 {1}个字符之间', [6, 12]), trigger: 'blur', }, ], diff --git a/vite.config.ts b/vite.config.ts index f4df73b7..6550a2fb 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -10,7 +10,7 @@ import { visualizer } from 'rollup-plugin-visualizer'; import AutoImport from 'unplugin-auto-import/vite'; import Components from 'unplugin-vue-components/vite'; import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'; -import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'; +// import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'; import { splitVendorChunkPlugin } from 'vite'; // @ts-ignore import { loadMessageConfig } from './src/config/locale'; @@ -28,11 +28,11 @@ export default ({ command, mode }: ConfigEnv): UserConfigExport => { setComponents: loadMessageConfig.componentLoad, }), splitVendorChunkPlugin(), - VueI18nPlugin({ - /* options */ - // locale messages resource pre-compile option - include: ['./src/**/lang/**/*.json', './src/**/lang/*.json'], - }), + // VueI18nPlugin({ + // /* options */ + // // locale messages resource pre-compile option + // include: ['./src/**/lang/**/*.json', './src/**/lang/*.json'], + // }), viteMockServe({ mockPath: 'mock/apiDemo', localEnabled: command === 'serve',