From a7340844f928f4c03f31c665c68286eb650517c4 Mon Sep 17 00:00:00 2001 From: pengm <674192343@qq.com> Date: Sun, 28 Sep 2025 10:45:15 +0800 Subject: [PATCH] 1.补充各类翻译 --- src/components/Common/CommonComponent/index.js | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/src/components/Common/CommonComponent/index.js b/src/components/Common/CommonComponent/index.js index a5183db..acdb1f1 100644 --- a/src/components/Common/CommonComponent/index.js +++ b/src/components/Common/CommonComponent/index.js @@ -749,11 +749,10 @@ export default class CommonComponent extends Component { } }; getSelectTableOption = () => { - const { selectTableData, selectTableIndex = 0 } = this.state; + const { selectTableData } = this.state; const { showConfig, app } = this.props; const { userinfo } = app; let { sTableTitleSql } = showConfig; - console.log('222', sTableTitleSql); /* 根据用户配置语言 设置表格标题 */ if (commonUtils.isJSON(sTableTitleSql) && sTableTitleSql.includes('Chinese')) { sTableTitleSql = this.getLocalizedString(sTableTitleSql, userinfo.sLanguage); @@ -772,7 +771,7 @@ export default class CommonComponent extends Component { const totalStringLen = titleStr.length; const otherStrLen = titleStr.replace(/[^\x00-\xff]/g, '').length; // eslint-disable-line const chineseStrLen = totalStringLen - otherStrLen; - const defaultWidth = (chineseStrLen * 12) + (otherStrLen * 8); + const defaultWidth = (chineseStrLen * 20) + (otherStrLen * 12); const maxStrLen = selectTableData.reduce((res, pre) => { let tempValue = pre[value] !== undefined ? pre[value] : ''; if (tempValue === '') { @@ -782,7 +781,7 @@ export default class CommonComponent extends Component { const totalStringLen = tempValue.length; const otherStrLen = tempValue.replace(/[^\x00-\xff]/g, '').length; // eslint-disable-line const chineseStrLen = totalStringLen - otherStrLen; - const tempWidth = (chineseStrLen * 12) + (otherStrLen * 8); + const tempWidth = (chineseStrLen * 20) + (otherStrLen * 12); return Math.max(tempWidth, res); }, defaultWidth); width = Math.min(maxStrLen + 8, 300); @@ -813,25 +812,16 @@ export default class CommonComponent extends Component { return (