fix(boards): 修复block init时由于this指向变化导致数据读取出错

This commit is contained in:
王立帮
2025-03-25 15:50:21 +08:00
parent 79bcd05ad1
commit b6556d2b09
22 changed files with 92 additions and 88 deletions

View File

@@ -347,7 +347,7 @@ export const ADS1015_setGain = {
.appendField(Blockly.Msg.ADS1015_setGain);
this.appendDummyInput("")
.setAlign(Blockly.inputs.Align.RIGHT)
.appendField(new Blockly.FieldDropdown(this.GAIN_TYPE), "ADS1015_setGain");
.appendField(new Blockly.FieldDropdown(ADS1015_setGain.GAIN_TYPE), "ADS1015_setGain");
this.setInputsInline(true);
this.setPreviousStatement(true, null);
this.setNextStatement(true, null);