我的 blockly.js 文件中有以下代码
Blockly.Blocks['account_number'] = {
// Other type.
init: function() {
this.jsonInit({
"message0": "account_number %1",
"args0": [{"type": "field_input", "name": "TYPE", "text": ""}],
"output": "Type",
"colour": 320,
"tooltip": "Custom type to allow.",
"helpUrl": "https://www.youtube.com/watch?v=s2_xaEvcVI0#t=702"
});
}
};
我在我的 index.html 中使用它,如下所示
<category name="sender" colour="%{BKY_MATH_HUE}">
<block type="account_number" name="accnum"></block>
</category>
如何在此 js 文件的帐号块中获取用户输入的数字?