From e92d2dd4c0a0b7164801d5f12934539eabee34da Mon Sep 17 00:00:00 2001 From: zhangzhen <525765282@qq.com> Date: Sun, 6 Jul 2025 21:37:48 +0800 Subject: [PATCH] 处理默认值不能置空问题; --- src/components/QuickQuote/index.jsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/QuickQuote/index.jsx b/src/components/QuickQuote/index.jsx index 381065d..02eec65 100644 --- a/src/components/QuickQuote/index.jsx +++ b/src/components/QuickQuote/index.jsx @@ -2494,7 +2494,14 @@ const PrintParamsComponent = props => { const dropDownData = commonUtils.convertStrToObj(sPrintConfig.sChineseDropDown, []); const dropDownDataSelected = dropDownData.find(item => item.sId === viewRow.sProcessId); - if (!dropDownDataSelected) return; + if (!dropDownDataSelected) { + props.setState(pre => ({ + ...pre, + backendParamsConfig: [], + backendConfig: {}, + })); + return; + } const backendParamsConfigNew = commonUtils.convertStrToObj(dropDownDataSelected.sParamConfig, []); props.setState(pre => ({ @@ -3129,7 +3136,7 @@ const BackendParamsExtraComponent = props => { const slaveRowData = slaveData.find(item => item.sTreeNodeName === selectedNode.showName && item.sBoxModel === sBoxModel) || {}; const { sBackProcessData = [] } = slaveRowData; - if (!sBackProcessData.some(item => item[sParentFieldsName])) return ""; + if (sParentFieldsName !== "sPrint" && !sBackProcessData.some(item => item[sParentFieldsName])) return ""; const viewConfigs = backendParamsConfig.map(item => ({ ...item, -- libgit2 0.22.2