Browse Source

🐞 fix: 国际化,提示词,地区列表宽度

huangqizheng/feature-20251213090502-现金退款多语言
zhangrenyuan 1 month ago
parent
commit
b7f4255414
  1. 22
      src/main.ts
  2. 2
      src/views/recharge/gold/coinRechargeDetail.vue
  3. 2
      src/views/refund/gold/addCoinRefund.vue

22
src/main.ts

@ -2,7 +2,9 @@ import {createApp} from 'vue'
import App from './App.vue' import App from './App.vue'
import router from './router' import router from './router'
import ElementPlus from 'element-plus' import ElementPlus from 'element-plus'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
// import zhCn from 'element-plus/es/locale/lang/zh-cn'
// import en from 'element-plus/es/locale/lang/en'
// import th from 'element-plus/es/locale/lang/th'
import 'element-plus/dist/index.css' import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue' import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import './assets/css/common.css' // 引入公共CSS文件 import './assets/css/common.css' // 引入公共CSS文件
@ -34,10 +36,22 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
app.component('downloadExcel', JsonExcel) app.component('downloadExcel', JsonExcel)
app.config.globalProperties.$http = request app.config.globalProperties.$http = request
// // 动态设置 Element Plus 的语言
// const getElementPlusLocale = () => {
// const lang = localStorage.getItem('lang') || 'zh-CN'
// switch (lang) {
// case 'en':
// return en
// case 'th':
// return th
// case 'zh-CN':
// default:
// return zhCn
// }
// }
// 使用各种插件 // 使用各种插件
app.use(ElementPlus, {
locale: zhCn
})
app.use(ElementPlus)
.use(router) .use(router)
.use(VxeUI) .use(VxeUI)
.use(VxeUITable) .use(VxeUITable)

2
src/views/recharge/gold/coinRechargeDetail.vue

@ -682,7 +682,7 @@ const getTagText = (state) => {
</el-table-column> </el-table-column>
<el-table-column fixed="left" prop="name" :label="$t('common_list.name')" width="150px" /> <el-table-column fixed="left" prop="name" :label="$t('common_list.name')" width="150px" />
<el-table-column fixed="left" prop="jwcode" :label="$t('common_list.jwcode')" width="110px" /> <el-table-column fixed="left" prop="jwcode" :label="$t('common_list.jwcode')" width="110px" />
<el-table-column prop="market" :label="$t('common_list.market')" width="100px" />
<el-table-column prop="market" :label="$t('common_list.market')" width="120px" />
<el-table-column prop="activity" :label="$t('common_list.activity')" width="110px" show-overflow-tooltip /> <el-table-column prop="activity" :label="$t('common_list.activity')" width="110px" show-overflow-tooltip />
<el-table-column prop="rateName" :label="$t('common_list.rateName')" width="110px" /> <el-table-column prop="rateName" :label="$t('common_list.rateName')" width="110px" />
<el-table-column prop="money" sortable="custom" :label="$t('common_list.rechargeAmount')" width="110px" /> <el-table-column prop="money" sortable="custom" :label="$t('common_list.rechargeAmount')" width="110px" />

2
src/views/refund/gold/addCoinRefund.vue

@ -395,7 +395,7 @@ const handleGoldInput = (type, value) => {
// //
const correctedValue = maxValue.toFixed(2); const correctedValue = maxValue.toFixed(2);
addRefund.value[type] = correctedValue; addRefund.value[type] = correctedValue;
// ElMessage.warning(t('elmessage.limitBalance'));
ElMessage.warning(t('elmessage.limitBalance'));
} }
if (inputValue < 0) { if (inputValue < 0) {

Loading…
Cancel
Save