UNPKG

@javaguns/flow-ui

Version:

``` <template> <a-spin :spinning="loading"> <FlowDesigner ref="flowDesigner" top="50px"> </FlowDesigner> </a-spin> </template> <script lang="ts" setup> import { ref, provide, onMounted } from 'vue'; import { FlowDesigner, LoadingKey } from '@j

54 lines (53 loc) 1.83 kB
import { defineComponent as a, ref as u, inject as _, openBlock as s, createElementBlock as h, normalizeClass as w, unref as o, createElementVNode as l, withModifiers as n, createVNode as t, createBlock as N, createCommentVNode as v } from "vue"; import { useNode as C } from "../../hooks/useNode.mjs"; import { VerticalKey as M } from "../../utils/injection-key.mjs"; import k from "../widget/flowArrowLine.vue.mjs"; import y from "../widget/flowAddNode.vue.mjs"; import B from "./assembleNode.vue.mjs"; import { FlowSimpleNode as b } from "../../flow-node/flow-simple-node/index.mjs"; const E = { class: "flow-chart-normal-node-wrap" }, V = a({ name: "flow-chart-start-node" }), q = /* @__PURE__ */ a({ ...V, props: { node: { default: { nodeName: "开始" } }, isMouseEnter: { type: Boolean, default: !1 } }, setup(c) { const e = c, { showNode: $, showSubNode: d } = C(), r = u(!1), i = () => { r.value = !0; }, m = () => { r.value = !1; }, f = () => { }, p = _(M, !1); return (x, S) => (s(), h("div", { class: w(["flow-chart-normal-node-container", { vertical: o(p) }]) }, [ l("div", E, [ l("div", { class: "flow-chart-normal-node-content-wrap", onMouseenter: n(i, ["stop"]), onMouseleave: n(m, ["stop"]), onClick: n(f, ["stop"]) }, [ t(o(b), { node: e.node, "sub-type": "end" }, null, 8, ["node"]) ], 32), t(k), t(y, { btnType: e.isMouseEnter ? "dot" : "", node: e.node }, null, 8, ["btnType", "node"]) ]), o(d)(e.node) && e.node.childNode ? (s(), N(B, { key: 0, node: e.node.childNode }, null, 8, ["node"])) : v("", !0) ], 2)); } }); export { q as default };