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

42 lines (41 loc) 1.37 kB
import { defineComponent as d, ref as u, onMounted as i, computed as l, openBlock as p, createElementBlock as c, normalizeClass as m, normalizeStyle as f, renderSlot as h, createTextVNode as y, toDisplayString as _ } from "vue"; import "./style/circle.css"; import { NODE_SUB_TYPES_MAP as a } from "../../utils/constant.mjs"; const g = d({ name: "guns-circle-node" }), b = /* @__PURE__ */ d({ ...g, props: { type: { default: a.start }, name: { default: "开始" }, complete: { type: Boolean, default: !1 }, width: { default: "60px" }, height: { default: "60px" }, top: { default: "20px" }, bottom: { default: "20px" }, borderRadius: { default: "60px" } }, setup(n) { const t = u("开始"), e = n; i(() => { t.value = e.name, e.type == a.end && e.name == "开始" && (t.value = "结束"); }); const r = l(() => ({ [`guns-flow-node-${e.type}`]: e.type, "node-status-complete": e.complete })), s = l(() => ({ width: e.width, height: e.height, "border-radius": e.borderRadius == e.width ? e.borderRadius : e.width })); return (o, w) => (p(), c("div", { class: m(["guns-flow-node-circle node-name", r.value]), style: f(s.value) }, [ h(o.$slots, "default", {}, () => [ y(_(t.value), 1) ]) ], 6)); } }); export { b as default };