Просмотр исходного кода

添加 demo 事件暴露不完整

xiaoyang 5 лет назад
Родитель
Сommit
d9c18b9d13
2 измененных файлов с 9 добавлено и 5 удалено
  1. 3 2
      src/components/DrawFlow/src/components/AddNodeBtn.vue
  2. 6 3
      src/views/Home.vue

+ 3 - 2
src/components/DrawFlow/src/components/AddNodeBtn.vue

@@ -12,9 +12,9 @@ export default {
   },
   props: {
     belongToNode: {
-      type: Number || String,
+      type: Object,
       default() {
-        return "1";
+        return {};
       }
     }
   },
@@ -36,6 +36,7 @@ export default {
   },
   mounted() {},
   render() {
+    console.log(this.belongToNode, "this.belongeto");
     const node = this.belongToNode;
     return (
       <div class="add-node-btn-box">

+ 6 - 3
src/views/Home.vue

@@ -3,6 +3,11 @@
     <FactoryDrawFlow :FlowConfig="FlowConfig"></FactoryDrawFlow>
   </div>
 </template>
+<style lang="less" scoped>
+#drawProcessDesign {
+  background: #f0f2f5;
+}
+</style>
 
 <script>
 // @ is an alias to /src
@@ -41,9 +46,7 @@ export default {
       return this.FlowConfig;
     },
     init() {
-      if (this.processDesign.length) {
-        this.FlowConfig = this.transform(this.processDesign);
-      }
+      // this.FlowConfig = this.transform(this.FlowConfig);
     },
     transform(arr) {
       let resArr = [];