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

63 lines (62 loc) 1.94 kB
import { defineComponent as c, ref as i, onMounted as g, openBlock as s, createBlock as r, unref as u, withCtx as l, createVNode as f } from "vue"; import { pluginManager as m } from "@javaguns/utils"; import { getFlowGeConfig as y, saveFlowGeConfig as b } from "../../utils/dataApi.mjs"; import w from "../common/flowDrawerContent.vue.mjs"; import C from "../common/flowDrawerOption.vue.mjs"; const x = c({ name: "flow-base-setting" }), F = /* @__PURE__ */ c({ ...x, props: { modelId: {}, definitionId: {} }, setup(p, { expose: v }) { const _ = m.getComponent("Tabs"), I = m.getComponent("TabPane"), t = p, n = i(1), o = i([]); return g(async () => { const d = { modelId: t.modelId, definitionId: t.definitionId }, e = await y(d); e.data.data && e.data.data.length > 0 && (e.data.data.forEach((a) => { a.modelId = t.modelId, a.definitionId = t.definitionId; }), o.value = e.data.data); }), v({ save: async () => { try { return await b(o.value), !0; } catch { return !1; } } }), (d, e) => (s(), r(u(_), { class: "demo-tabs", modelValue: n.value, "onUpdate:modelValue": e[0] || (e[0] = (a) => n.value = a), activeKey: n.value, "onUpdate:activeKey": e[1] || (e[1] = (a) => n.value = a), type: "line", animated: "" }, { default: l(() => [ (s(), r(u(I), { label: "基础设置", title: "基础设置", name: 1, key: 1, tab: "基础设置", forceRender: "" }, { default: l(() => [ f(w, null, { default: l(() => [ f(C, { datas: o.value }, null, 8, ["datas"]) ]), _: 1 }) ]), _: 1 })) ]), _: 1 }, 8, ["modelValue", "activeKey"])); } }); export { F as default };