Commit 59378d2a7c2822e48e2428eba7b954707e835326

Authored by Min
2 parents 908a02ab 9061710b

Merge branch 'main' of http://git.xlyprint.cn/zhangz/xlyUmi

src/components/Common/InstructSetSetting/index.js
@@ -99,12 +99,21 @@ const InstructSetSetting = (props = {}) => { @@ -99,12 +99,21 @@ const InstructSetSetting = (props = {}) => {
99 if (command === "initData") { 99 if (command === "initData") {
100 // if (!bConfigured && props.name !== "master") return; 100 // if (!bConfigured && props.name !== "master") return;
101 101
  102 + let value = instructSet;
  103 + if (commonUtils.isEmptyObject(instructSet)) {
  104 + value = [];
  105 + } else if (!Array.isArray(instructSet)) {
  106 + value = [instructSet];
  107 + }
  108 +
  109 + value = instructSet.change || instructSet.blur || value;
  110 +
102 iframeRef.current.contentWindow.postMessage( 111 iframeRef.current.contentWindow.postMessage(
103 { 112 {
104 tableName: name, 113 tableName: name,
105 sFieldName, 114 sFieldName,
106 command: "initData", 115 command: "initData",
107 - value: instructSet.change || instructSet.blur || (commonUtils.isNotEmptyObject(instructSet) ? [instructSet] : []), 116 + value,
108 slave0Data, 117 slave0Data,
109 configList: configList.current, 118 configList: configList.current,
110 srcModelsList: srcModelsList.current, 119 srcModelsList: srcModelsList.current,