mirror of
https://github.com/vform666/variant-form3-vite.git
synced 2024-11-10 09:39:20 +08:00
解决element plus升级新版2.3.8后,项目启动报错的问题。
This commit is contained in:
parent
949a75ea29
commit
3a0f61e316
16
src/App.vue
16
src/App.vue
@ -1,5 +1,4 @@
|
||||
<template>
|
||||
<el-config-provider :locale="elLocale">
|
||||
<div id="app">
|
||||
<VFormDesigner ref="vfDesignerRef" :global-dsv="globalDsv">
|
||||
<!--
|
||||
@ -9,15 +8,11 @@
|
||||
-->
|
||||
</VFormDesigner>
|
||||
</div>
|
||||
</el-config-provider>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import VFormDesigner from './components/form-designer/index.vue'
|
||||
|
||||
import zhCNLang from 'element-plus/lib/locale/lang/zh-cn'
|
||||
import enUSLang from 'element-plus/lib/locale/lang/en'
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
components: {
|
||||
@ -25,11 +20,6 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
elLocaleMap: {
|
||||
'zh-CN': zhCNLang,
|
||||
'en-US': enUSLang,
|
||||
},
|
||||
|
||||
//全局数据源变量
|
||||
globalDsv: {
|
||||
testApiHost: 'http://www.test.com/api',
|
||||
@ -39,11 +29,7 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
elLocale() {
|
||||
let curLocale = localStorage.getItem('v_form_locale') || 'zh-CN'
|
||||
return this.elLocaleMap[curLocale]
|
||||
},
|
||||
|
||||
//
|
||||
},
|
||||
methods: {
|
||||
doTest() {
|
||||
|
@ -1,9 +1,5 @@
|
||||
import { createI18n } from './smart-vue-i18n/index'
|
||||
|
||||
import enLocaleElement from "element-plus/lib/locale/lang/en";
|
||||
import zhLocaleElement from "element-plus/lib/locale/lang/zh-cn";
|
||||
//import locale from "element-plus/lib/locale"
|
||||
|
||||
import enLocale from "@/lang/en-US";
|
||||
import zhLocale from "@/lang/zh-CN";
|
||||
import enLocale_render from "@/lang/en-US_render";
|
||||
@ -16,7 +12,6 @@ const langResources = {
|
||||
something: {
|
||||
//...
|
||||
},
|
||||
...enLocaleElement,
|
||||
...enLocale,
|
||||
...enLocale_render,
|
||||
...enLocale_extension
|
||||
@ -26,7 +21,6 @@ const langResources = {
|
||||
something: {
|
||||
//...
|
||||
},
|
||||
...zhLocaleElement,
|
||||
...zhLocale,
|
||||
...zhLocale_render,
|
||||
...zhLocale_extension
|
||||
|
Loading…
Reference in New Issue
Block a user