闫增涛
2024-06-25 a4ca94a580c518285395ce8da62d0165ab0de3a1
src/components/drawflow/index.vue
@@ -53,7 +53,7 @@
      @drop="drop"
      @dragover="allowDrop"
    >
      <div class="btn-export" @click="exportData">导出</div>
      <div class="btn-export" @click="exportData">保存</div>
      <div class="btn-clear" @click="editor.clearModuleSelected()">清空</div>
    </div>
  </div>
@@ -89,6 +89,10 @@
    exportData() {
      let dataJ = this.editor.export();
      this.$emit("getDrawData", dataJ);
      this.$message({
        type: "success",
        message: "已保存",
      });
    },
    init() {
      this.editor = new Drawflow(
@@ -249,6 +253,9 @@
<style scoped lang="less">
@import "drawflow/dist/drawflow.min.css";
.drawflow .drawflow-node.selected {
  background: #fff;
}
.drawflow {
  width: 100%;
  height: 100%;
@@ -257,7 +264,7 @@
  background: #fff;
}
.menu {
  width: 150px;
  width: 160px;
  border-right: 1px solid #ccc;
}
/* .menuItem {
@@ -272,7 +279,6 @@
    justify-content: flex-start;
    padding-left: 28px;
    align-items: baseline;
    font-size: 16px;
    svg {
      top: 6px;
      left: 10px;