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

@@ -1806,7 +1806,7 @@ export const lcd_display_pattern = {
.appendField(Blockly.Msg.COLUMN_DISPLAY_IMAGE);
this.appendDummyInput()
.appendField(Blockly.Msg.LCD_NUMBERING)
.appendField(new Blockly.FieldDropdown(this.NUMBER), "number");
.appendField(new Blockly.FieldDropdown(lcd_display_pattern.NUMBER), "number");
this.setPreviousStatement(true, null);
this.setNextStatement(true, null);
this.setColour(DISPLAY_HUE);
@@ -2121,7 +2121,7 @@ export const TFT_Rotation = {
this.appendDummyInput("")
.setAlign(Blockly.inputs.Align.RIGHT)
.appendField(Blockly.Msg.MIXLY_DISPLAY_MATRIX_ROTATE)
.appendField(new Blockly.FieldDropdown(this.ROTATION_TYPE), "Rotation_TYPE");
.appendField(new Blockly.FieldDropdown(TFT_Rotation.ROTATION_TYPE), "Rotation_TYPE");
this.setPreviousStatement(true);
this.setNextStatement(true);
this.setInputsInline(true);