Commit 9061710bd4e9e9cc89d261cb32e56f5057ed3dad
1 parent
20239b4f
优化指令集可视化功能;
Showing
1 changed file
with
10 additions
and
1 deletions
src/components/Common/InstructSetSetting/index.js
| ... | ... | @@ -99,12 +99,21 @@ const InstructSetSetting = (props = {}) => { |
| 99 | 99 | if (command === "initData") { |
| 100 | 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 | 111 | iframeRef.current.contentWindow.postMessage( |
| 103 | 112 | { |
| 104 | 113 | tableName: name, |
| 105 | 114 | sFieldName, |
| 106 | 115 | command: "initData", |
| 107 | - value: instructSet.change || instructSet.blur || (commonUtils.isNotEmptyObject(instructSet) ? [instructSet] : []), | |
| 116 | + value, | |
| 108 | 117 | slave0Data, |
| 109 | 118 | configList: configList.current, |
| 110 | 119 | srcModelsList: srcModelsList.current, | ... | ... |