python online 加块
时间戳转日期 enumerate函数
This commit is contained in:
@@ -1032,4 +1032,16 @@ export const get_unique_identifier = {
|
||||
};
|
||||
|
||||
// export const base_type = controls_type;
|
||||
// export const controls_TypeLists = controls_typeLists;
|
||||
// export const controls_TypeLists = controls_typeLists;
|
||||
|
||||
export const datetime_fromtimestamp = {
|
||||
init: function () {
|
||||
this.setColour(LOOPS_HUE);
|
||||
this.appendValueInput('VAR')
|
||||
.appendField(Blockly.Msg.MIXLY_RTC_TIMESTAMP);
|
||||
this.appendDummyInput()
|
||||
.appendField(Blockly.Msg.MIXLY_TIMESTAMP_TO_DATA);
|
||||
this.setInputsInline(true);
|
||||
this.setOutput(true, Number);
|
||||
}
|
||||
};
|
||||
@@ -794,3 +794,33 @@ export const lists_insert_value2 = lists_insert_value
|
||||
export const lists_remove_at2 = lists_remove_at
|
||||
export const list_tolist2 = list_tolist;
|
||||
|
||||
|
||||
export const ENUMERATE ={
|
||||
init: function () {
|
||||
this.setColour(LISTS_HUE);
|
||||
this.appendValueInput('VAR')
|
||||
.appendField(Blockly.Msg.blockpy_USE_LIST);
|
||||
this.appendDummyInput()
|
||||
.appendField(Blockly.Msg.MIXLY_TO_INDEX_SEQUENCE);
|
||||
// this.appendValueInput('VAR_N')
|
||||
// .appendField(Blockly.Msg.MIXLY_INDEX+Blockly.Msg.MIXLY_STARTSWITH);
|
||||
this.setInputsInline(true);
|
||||
this.setOutput(true, Number);
|
||||
this.setTooltip(Blockly.Msg.MIXLY_TOTO_INDEX_SEQUENC_TOOLTIP);
|
||||
}
|
||||
};
|
||||
|
||||
export const enumerate = {
|
||||
init: function () {
|
||||
this.setColour(LISTS_HUE);
|
||||
this.appendDummyInput()
|
||||
.appendField(Blockly.Msg.blockpy_USE_LIST);
|
||||
this.appendValueInput('LIST');
|
||||
this.appendValueInput('VALUE')
|
||||
.appendField(Blockly.Msg.MIXLY_TO_INDEX_SEQUENCE)
|
||||
.appendField(Blockly.Msg.MIXLY_INDEX+Blockly.Msg.MIXLY_STARTSWITH);
|
||||
this.setInputsInline(true);
|
||||
this.setOutput(true);
|
||||
this.setTooltip(Blockly.Msg.MIXLY_TOTO_INDEX_SEQUENC_TOOLTIP);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user