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 (