|
@@ -1,5 +1,8 @@
|
|
|
<template>
|
|
|
<div class="ablockly">
|
|
|
+ <div>
|
|
|
+ <el-button type="primary" @click="go">下一步</el-button>
|
|
|
+ </div>
|
|
|
<div id="blocklyDiv"></div>
|
|
|
<xml id="toolbox" style="display: none">
|
|
|
<category name="逻辑" colour="%{BKY_LOGIC_HUE}">
|
|
@@ -56,7 +59,7 @@ Vue.config.ignoredElements.push("mutation");
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- that: this
|
|
|
+ that: this,
|
|
|
};
|
|
|
},
|
|
|
|
|
@@ -80,7 +83,11 @@ export default {
|
|
|
// 清空工作区
|
|
|
clearBlockData() {
|
|
|
this.workspace.clear();
|
|
|
- }
|
|
|
+ },
|
|
|
+ //下一步
|
|
|
+ go() {
|
|
|
+ this.$router.push("./function?isCamera=" + false);
|
|
|
+ },
|
|
|
},
|
|
|
|
|
|
mounted() {
|
|
@@ -92,13 +99,13 @@ export default {
|
|
|
//媒体资源
|
|
|
media: "../assets/img/",
|
|
|
//垃圾桶
|
|
|
- trashcan: true
|
|
|
+ trashcan: true,
|
|
|
});
|
|
|
//工作区监听代码生成器
|
|
|
this.workspace.addChangeListener(this.myUpdateFunction);
|
|
|
|
|
|
Blockly.Blocks["iot_lcd_screeninit"] = {
|
|
|
- init: function() {
|
|
|
+ init: function () {
|
|
|
this.appendDummyInput().appendField(
|
|
|
new Blockly.FieldImage(
|
|
|
require("../assets/img/screen_init_header.png"),
|
|
@@ -113,16 +120,16 @@ export default {
|
|
|
this.setColour("#5cb2d6");
|
|
|
this.setTooltip("");
|
|
|
this.setHelpUrl("");
|
|
|
- }
|
|
|
+ },
|
|
|
};
|
|
|
|
|
|
- Blockly.JavaScript.iot_lcd_screeninit = function(block) {
|
|
|
+ Blockly.JavaScript.iot_lcd_screeninit = function (block) {
|
|
|
var _code = "";
|
|
|
return _code;
|
|
|
};
|
|
|
|
|
|
Blockly.Blocks["iot_lcd_faceinit"] = {
|
|
|
- init: function() {
|
|
|
+ init: function () {
|
|
|
this.appendDummyInput().appendField(
|
|
|
new Blockly.FieldImage(
|
|
|
require("../assets/img/face_recognition_header.png"),
|
|
@@ -137,13 +144,13 @@ export default {
|
|
|
this.setColour("#ee783a");
|
|
|
this.setTooltip("");
|
|
|
this.setHelpUrl("");
|
|
|
- }
|
|
|
+ },
|
|
|
};
|
|
|
|
|
|
- Blockly.JavaScript.iot_lcd_faceinit = function(block) {
|
|
|
+ Blockly.JavaScript.iot_lcd_faceinit = function (block) {
|
|
|
var _code = "";
|
|
|
return _code;
|
|
|
};
|
|
|
- }
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|