Fix(boards): 修复arduino板卡函数创建块参数初始化异常
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -182,6 +182,7 @@ export const procedures_defnoreturn = {
|
|||||||
// to separate params from variables.
|
// to separate params from variables.
|
||||||
'name': this.argumentVarModels_[i].name,
|
'name': this.argumentVarModels_[i].name,
|
||||||
'id': this.argumentVarModels_[i].getId(),
|
'id': this.argumentVarModels_[i].getId(),
|
||||||
|
'type': this.argumentstype_[i],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -198,6 +199,7 @@ export const procedures_defnoreturn = {
|
|||||||
*/
|
*/
|
||||||
loadExtraState: function (state) {
|
loadExtraState: function (state) {
|
||||||
this.arguments_ = [];
|
this.arguments_ = [];
|
||||||
|
this.argumentstype_ = [];
|
||||||
this.argumentVarModels_ = [];
|
this.argumentVarModels_ = [];
|
||||||
if (state['params']) {
|
if (state['params']) {
|
||||||
for (let i = 0; i < state['params'].length; i++) {
|
for (let i = 0; i < state['params'].length; i++) {
|
||||||
@@ -209,6 +211,7 @@ export const procedures_defnoreturn = {
|
|||||||
'',
|
'',
|
||||||
);
|
);
|
||||||
this.arguments_.push(variable.name);
|
this.arguments_.push(variable.name);
|
||||||
|
this.argumentstype_.push(param['type']);
|
||||||
this.argumentVarModels_.push(variable);
|
this.argumentVarModels_.push(variable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import { Workspace, ContextMenu } from 'mixly';
|
import { Workspace, ContextMenu } from 'mixly';
|
||||||
import FSArduEsp8266Handler from './fs-board-handler';
|
import FSArduEsp8266Handler from './fs-board-handler';
|
||||||
import { Msg } from 'blockly/core';
|
import { Msg } from 'blockly/core';
|
||||||
|
import * as goog from 'goog';
|
||||||
|
|
||||||
|
|
||||||
export default function addBoardFSItem () {
|
export default function addBoardFSItem () {
|
||||||
const mainWorkspace = Workspace.getMain();
|
const mainWorkspace = Workspace.getMain();
|
||||||
|
|||||||
Reference in New Issue
Block a user