From c9e37977c3e72a8d4ff32fd60de632241a1cca4d Mon Sep 17 00:00:00 2001 From: zhangzhen <525765282@qq.com> Date: Wed, 18 Jun 2025 16:49:56 +0800 Subject: [PATCH] 自定义列名新增sDropDownData下拉配置; --- src/components/Common/CommonElementEvent.js | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/components/Common/CommonElementEvent.js b/src/components/Common/CommonElementEvent.js index 5c27c66..28600a9 100644 --- a/src/components/Common/CommonElementEvent.js +++ b/src/components/Common/CommonElementEvent.js @@ -1643,23 +1643,18 @@ export default (ChildComponent) => { const configObj = sColTitleNameIndex === undefined ? JSON.parse(sColTitleName) : JSON.parse(sColTitleName)[sColTitleNameIndex]; const gdsconfigformslaveNew = []; if (commonUtils.isNotEmptyObject(configObj)) { - const { sDropDownData = {} } = configObj; + const { extraConfig = {} } = configObj; for (const key of Object.keys(configObj)) { - if (!['panelName', 'sDropDownData'].includes(key)) { - const configNew = {}; + if (!['panelName', 'extraConfig'].includes(key)) { + let configNew = {}; configNew.sName = key; configNew.sChinese = configObj[key]; configNew.bVisible = true; configNew.iFitWidth = 80; configNew.showName = configObj[key]; configNew.bReadonly = false; - if (sDropDownData[key]) { - configNew.sDropDownType = 'const'; - configNew.showDropDown = JSON.stringify(sDropDownData[key].split(',').reduce((pre, item) => { - pre[item] = item; - return pre; - }, {})); - console.log('=====configNew', configNew); + if (extraConfig[key]) { + configNew = { ...configNew, ...extraConfig[key] }; } gdsconfigformslaveNew.push(configNew); } -- libgit2 0.22.2