Skip to content

Commit

Permalink
fix: 去除VueI18nPlugin以让Vue18n其支持内联 JavaScript 字符串的模板
Browse files Browse the repository at this point in the history
  • Loading branch information
HOMEDO\zhangjiayun authored and yuntian001 committed Aug 28, 2022
1 parent 5526274 commit e76411f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/views/login/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const rules = computed<FormRules>(() => ({
{
min: 6,
max: 12,
message: t('长度必须 在 {0} 到 {1}个字符之间', [6, 12]),
message: t('长度必须在 {0} 到 {1}个字符之间', [6, 12]),
trigger: 'blur',
},
],
Expand Down
12 changes: 6 additions & 6 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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',
Expand Down

0 comments on commit e76411f

Please sign in to comment.