From 9061710bd4e9e9cc89d261cb32e56f5057ed3dad Mon Sep 17 00:00:00 2001 From: zhangzhen <525765282@qq.com> Date: Fri, 21 Nov 2025 16:48:06 +0800 Subject: [PATCH] 优化指令集可视化功能; --- src/components/Common/InstructSetSetting/index.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/Common/InstructSetSetting/index.js b/src/components/Common/InstructSetSetting/index.js index 76754bc..6c70587 100644 --- a/src/components/Common/InstructSetSetting/index.js +++ b/src/components/Common/InstructSetSetting/index.js @@ -99,12 +99,21 @@ const InstructSetSetting = (props = {}) => { if (command === "initData") { // if (!bConfigured && props.name !== "master") return; + let value = instructSet; + if (commonUtils.isEmptyObject(instructSet)) { + value = []; + } else if (!Array.isArray(instructSet)) { + value = [instructSet]; + } + + value = instructSet.change || instructSet.blur || value; + iframeRef.current.contentWindow.postMessage( { tableName: name, sFieldName, command: "initData", - value: instructSet.change || instructSet.blur || (commonUtils.isNotEmptyObject(instructSet) ? [instructSet] : []), + value, slave0Data, configList: configList.current, srcModelsList: srcModelsList.current, -- libgit2 0.22.2