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

78 lines (77 loc) 2.42 kB
import { defineComponent as u, getCurrentInstance as x, ref as t, openBlock as y, createBlock as I, unref as r, withCtx as p, createVNode as a } from "vue"; import { pluginManager as n } from "@javaguns/utils"; import { FlowSelection as b } from "../../flow-selection/index.mjs"; const C = u({ name: "flow-operate-copyer" }), k = /* @__PURE__ */ u({ ...C, setup(_, { expose: m }) { const d = n.getComponent("Form"), s = n.getComponent("FormItem"), i = n.getComponent("Textarea"), { appContext: v } = x(); v.app.config.globalProperties.$flowUI; const f = t(), c = { style: { width: "100px" } }, e = t({ approverIds: [], approverNames: [], whisper: "" }), w = t({ // newApprover: [{ required: true, message: '请选择转交人员!', trigger: 'blur' }], }); return m({ valid: async () => { try { return e.value; } catch { } } }), (g, o) => (y(), I(r(d), { ref_key: "copyerForm", ref: f, model: e.value, rules: w.value, "label-col": c, layout: "vertical", "label-position": "top" }, { default: p(() => [ a(r(s), { label: "抄送人", name: "approverIds", prop: "approverIds" }, { default: p(() => [ a(r(b), { ref: "flowSelection", type: "user", title: "请选择抄送人员", isRadio: !1, min: 1, max: 25, modelValue: e.value.approverIds, "onUpdate:modelValue": o[0] || (o[0] = (l) => e.value.approverIds = l), label: e.value.approverNames }, null, 8, ["modelValue", "label"]) ]), _: 1 }), a(r(s), { label: "捎话", prop: "whisper" }, { default: p(() => [ a(r(i), { modelValue: e.value.whisper, "onUpdate:modelValue": o[1] || (o[1] = (l) => e.value.whisper = l), value: e.value.whisper, "onUpdate:value": o[2] || (o[2] = (l) => e.value.whisper = l), type: "textarea", rows: 3, placeholder: "捎话内容" }, null, 8, ["modelValue", "value"]) ]), _: 1 }) ]), _: 1 }, 8, ["model", "rules"])); } }); export { k as default };