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>
|
<template>
|
||||||
<el-config-provider :locale="elLocale">
|
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<VFormDesigner ref="vfDesignerRef" :global-dsv="globalDsv">
|
<VFormDesigner ref="vfDesignerRef" :global-dsv="globalDsv">
|
||||||
<!--
|
<!--
|
||||||
@ -9,15 +8,11 @@
|
|||||||
-->
|
-->
|
||||||
</VFormDesigner>
|
</VFormDesigner>
|
||||||
</div>
|
</div>
|
||||||
</el-config-provider>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import VFormDesigner from './components/form-designer/index.vue'
|
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 {
|
export default {
|
||||||
name: 'App',
|
name: 'App',
|
||||||
components: {
|
components: {
|
||||||
@ -25,11 +20,6 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
elLocaleMap: {
|
|
||||||
'zh-CN': zhCNLang,
|
|
||||||
'en-US': enUSLang,
|
|
||||||
},
|
|
||||||
|
|
||||||
//全局数据源变量
|
//全局数据源变量
|
||||||
globalDsv: {
|
globalDsv: {
|
||||||
testApiHost: 'http://www.test.com/api',
|
testApiHost: 'http://www.test.com/api',
|
||||||
@ -39,11 +29,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
elLocale() {
|
//
|
||||||
let curLocale = localStorage.getItem('v_form_locale') || 'zh-CN'
|
|
||||||
return this.elLocaleMap[curLocale]
|
|
||||||
},
|
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doTest() {
|
doTest() {
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
import { createI18n } from './smart-vue-i18n/index'
|
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 enLocale from "@/lang/en-US";
|
||||||
import zhLocale from "@/lang/zh-CN";
|
import zhLocale from "@/lang/zh-CN";
|
||||||
import enLocale_render from "@/lang/en-US_render";
|
import enLocale_render from "@/lang/en-US_render";
|
||||||
@ -16,7 +12,6 @@ const langResources = {
|
|||||||
something: {
|
something: {
|
||||||
//...
|
//...
|
||||||
},
|
},
|
||||||
...enLocaleElement,
|
|
||||||
...enLocale,
|
...enLocale,
|
||||||
...enLocale_render,
|
...enLocale_render,
|
||||||
...enLocale_extension
|
...enLocale_extension
|
||||||
@ -26,7 +21,6 @@ const langResources = {
|
|||||||
something: {
|
something: {
|
||||||
//...
|
//...
|
||||||
},
|
},
|
||||||
...zhLocaleElement,
|
|
||||||
...zhLocale,
|
...zhLocale,
|
||||||
...zhLocale_render,
|
...zhLocale_render,
|
||||||
...zhLocale_extension
|
...zhLocale_extension
|
||||||
|
Loading…
Reference in New Issue
Block a user