Commit 3135f7421fce7d1bc197d4953a353f9f03442c46

Authored by ww
1 parent dbe30fbc

fix: switch button can not send command

@@ -13766,12 +13766,12 @@ class HandleDataSource { @@ -13766,12 +13766,12 @@ class HandleDataSource {
13766 const { data } = message 13766 const { data } = message
13767 const type = this.getComponentType(node) 13767 const type = this.getComponentType(node)
13768 if (type === this.componentType.SWITCH) { 13768 if (type === this.componentType.SWITCH) {
13769 - this.handleSwitchComponent(message) 13769 + this.handleSwitchComponent(message, record)
13770 return 13770 return
13771 } 13771 }
13772 13772
13773 if (type === this.componentType.PARAMS_SETTING_BUTTON) { 13773 if (type === this.componentType.PARAMS_SETTING_BUTTON) {
13774 - this.handleParamSettingButton(message) 13774 + this.handleParamSettingButton(message, record)
13775 return 13775 return
13776 } 13776 }
13777 13777
@@ -13812,6 +13812,7 @@ class HandleDataSource { @@ -13812,6 +13812,7 @@ class HandleDataSource {
13812 flag = true 13812 flag = true
13813 this.updatePage(() => { 13813 this.updatePage(() => {
13814 const style = node.getStyle() 13814 const style = node.getStyle()
  13815 + if ((style || '').includes(imagePath)) return
13815 const sendValue = getSendValue(type) 13816 const sendValue = getSendValue(type)
13816 node.setStyle(style.replace(reg, `image=${imagePath}`)) 13817 node.setStyle(style.replace(reg, `image=${imagePath}`))
13817 node.setAttribute('label', '') 13818 node.setAttribute('label', '')