update 汉化ant design

This commit is contained in:
赵霄
2023-12-19 15:00:55 +08:00
parent 50be7bfc05
commit 9b9578c998
3 changed files with 22 additions and 16 deletions
+19 -15
View File
@@ -1,25 +1,28 @@
<template> <template>
<div id="app"> <a-locale-provider :locale="local">
<van-nav-bar <div id="app">
v-if="hasNavBar" <van-nav-bar
:class="{'white-style': isWhiteNavBar}" v-if="hasNavBar"
:title="pageTitle" :class="{'white-style': isWhiteNavBar}"
:left-text="hasBack ? $t('back') : ''" :title="pageTitle"
:left-arrow="hasBack" :left-text="hasBack ? $t('back') : ''"
:right-text="isChinese ? $t('chinese') : $t('english')" :left-arrow="hasBack"
@click-left="handleBack" :right-text="isChinese ? $t('chinese') : $t('english')"
@click-right="handleChangeLang" @click-left="handleBack"
/> @click-right="handleChangeLang"
<div class="scroll-box"> />
<router-view /> <div class="scroll-box">
<router-view />
</div>
</div> </div>
</div> </a-locale-provider>
</template> </template>
<script> <script>
import Vue from 'vue' import Vue from 'vue'
import { Locale } from 'vant' import { Locale } from 'vant'
import zhCN from 'vant/es/locale/lang/zh-CN' import zhCN from 'vant/es/locale/lang/zh-CN'
import enUS from 'vant/es/locale/lang/en-US' import enUS from 'vant/es/locale/lang/en-US'
import zh_CN from 'ant-design-vue/lib/locale-provider/zh_CN'
const ZH = 'zh-CN' const ZH = 'zh-CN'
const EN = 'en-US' const EN = 'en-US'
@@ -28,7 +31,8 @@ export default {
name: 'App', name: 'App',
data () { data () {
return { return {
currentLang: ZH currentLang: ZH,
local: zh_CN
} }
}, },
created () { created () {
+1
View File
@@ -41,6 +41,7 @@ module.exports = {
clickToUpload: '点击上传', clickToUpload: '点击上传',
operation: '操作', operation: '操作',
strip: '条', strip: '条',
total: '共',
// 标准法规入库/变更流程 // 标准法规入库/变更流程
standardEntryOrChange: { standardEntryOrChange: {
source: '来源', source: '来源',
+2 -1
View File
@@ -15,7 +15,7 @@ import { ACCESS_TOKEN, USER_INFO } from '@/store/mutation-types'
import './permission' import './permission'
import './assets/font/iconfont.css' import './assets/font/iconfont.css'
import { Table, FormModel, Input, Row, Col } from 'ant-design-vue' import { Table, FormModel, Input, Row, Col, LocaleProvider } from 'ant-design-vue'
import 'ant-design-vue/dist/antd.css' import 'ant-design-vue/dist/antd.css'
import Viewer from 'v-viewer' import Viewer from 'v-viewer'
@@ -31,6 +31,7 @@ Vue.use(FormModel)
Vue.use(Input) Vue.use(Input)
Vue.use(Row) Vue.use(Row)
Vue.use(Col) Vue.use(Col)
Vue.use(LocaleProvider)
Vue.use(Viewer) Vue.use(Viewer)
Viewer.setDefaults({ Viewer.setDefaults({