Commit 6b7d70f98fc39be0c93a03c8a47248fa274c7857

Authored by ww
1 parent 17a954d1

fix: 修复控制元件更新

... ... @@ -4903,8 +4903,8 @@ DataFormatPanel.prototype.addDataFont = function (container) {
4903 4903 const ss = ui.getSelectionState();
4904 4904 const vertices = ss.vertices || []
4905 4905 const sidebarInstance = ui.sidebar
4906   - console.log(vertices)
4907   - console.log(ui)
  4906 + // console.log(vertices)
  4907 + // console.log(ui)
4908 4908
4909 4909 const hasModifyNotSave = editor.status
4910 4910
... ... @@ -14769,6 +14769,7 @@ class HandleDataSource {
14769 14769 const { nodeId, attr } = record
14770 14770 const node = this.getNodeByNodeId(nodeId)
14771 14771 const [[_timespan, receiveValue] = []] = data[attr] || []
  14772 + if (receiveValue === null || receiveValue === undefined) return
14772 14773 const switchConfig = this.DispatchInstance.contentData.act.find(item => item.id === nodeId && item.type === 'SWITCH')
14773 14774 const { condition = [] } = switchConfig || {}
14774 14775 let reg = /image=[^;]+/g
... ... @@ -14848,8 +14849,9 @@ class HandleDataSource {
14848 14849 const { nodeId, attr } = record
14849 14850 const node = this.getNodeByNodeId(nodeId)
14850 14851 const [[_timespan, receiveValue] = []] = data[attr] || []
  14852 + if (receiveValue === null || receiveValue === undefined) return
14851 14853 this.updatePage(() => {
14852   - node.setAttribute('label', receiveValue)
  14854 + node.setAttribute('label', receiveValue)
14853 14855 }, node)
14854 14856 }
14855 14857
... ... @@ -15734,7 +15736,7 @@ class HandleDataInteraction {
15734 15736 } else {
15735 15737 const replaceValue = currentNode.getAttribute(SWITCH_SEND_VALUE)
15736 15738 value = jsonParse(content.jsonCommand)
15737   - value = replaceAttrPlaceholder(value, attr, replaceValue)
  15739 + value = replaceAttrPlaceholder(value, attr, isNaN(replaceValue) ? 0 : Number(replaceValue))
15738 15740 if (value) flag = true
15739 15741 }
15740 15742 } else {
... ...