mirror of
https://github.com/iczer/vue-antd-admin
synced 2025-04-06 04:00:06 +08:00
fix: Fix the problem that the international setting of ant-design-vue does not work.
修复 ant-design-vue 国际化配置不生效问题。
This commit is contained in:
parent
2e90b7c614
commit
94fb7964b2
@ -5,7 +5,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import zh_CN from 'ant-design-vue/lib/locale-provider/zh_CN'
|
import zh_CN from 'ant-design-vue/es/locale-provider/zh_CN'
|
||||||
import enquireScreen from './utils/device'
|
import enquireScreen from './utils/device'
|
||||||
import {mapState} from 'vuex'
|
import {mapState} from 'vuex'
|
||||||
|
|
||||||
@ -33,14 +33,14 @@ export default {
|
|||||||
this.$i18n.locale = val
|
this.$i18n.locale = val
|
||||||
switch (val) {
|
switch (val) {
|
||||||
case 'CN':
|
case 'CN':
|
||||||
this.locale = require('ant-design-vue/lib/locale-provider/zh_CN')
|
this.locale = require('ant-design-vue/es/locale-provider/zh_CN').default
|
||||||
break
|
break
|
||||||
case 'HK':
|
case 'HK':
|
||||||
this.locale = require('ant-design-vue/lib/locale-provider/zh_TW')
|
this.locale = require('ant-design-vue/es/locale-provider/zh_TW').default
|
||||||
break
|
break
|
||||||
case 'US':
|
case 'US':
|
||||||
default:
|
default:
|
||||||
this.locale = require('ant-design-vue/lib/locale-provider/en_US')
|
this.locale = require('ant-design-vue/es/locale-provider/en_US').default
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user