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,