@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
66 lines (65 loc) • 2 kB
JavaScript
import { defineComponent as i, ref as w, watch as h, onMounted as B, openBlock as m, createBlock as d, unref as n, withCtx as u, createVNode as c, createElementBlock as D, Fragment as U, renderList as y, createTextVNode as G, toDisplayString as M } from "vue";
import { pluginManager as a, toUgroup as N } from "@javaguns/utils";
import R from "../../hooks/useDrawer.mjs";
const E = i({ name: "flow-radio-group" }), T = /* @__PURE__ */ i({
...E,
props: {
modelValue: {}
},
emits: ["update:modelValue"],
setup(f, { emit: g }) {
const C = a.getComponent("CheckboxGroup"), v = a.getComponent("Checkbox"), V = a.getComponent("Row"), k = a.getComponent("Col"), s = f, { notices: x } = R(), t = w([]);
h(
() => s.modelValue,
(o) => {
p(o);
}
), B(() => {
p(s.modelValue);
});
const p = (o) => {
o ? t.value = N(o) : t.value = [];
}, _ = g, b = (o) => {
if (o) {
let l = o.reduce((e, r) => e + r);
_("update:modelValue", l);
}
};
return (o, l) => (m(), d(n(C), {
value: t.value,
"onUpdate:value": l[0] || (l[0] = (e) => t.value = e),
modelValue: t.value,
"onUpdate:modelValue": l[1] || (l[1] = (e) => t.value = e),
onChange: b
}, {
default: u(() => [
c(n(V), { gutter: 12 }, {
default: u(() => [
(m(!0), D(U, null, y(n(x), (e, r) => (m(), d(n(k), {
span: 8,
key: r
}, {
default: u(() => [
c(n(v), {
value: e.value,
label: e.value
}, {
default: u(() => [
G(M(e.name), 1)
]),
_: 2
}, 1032, ["value", "label"])
]),
_: 2
}, 1024))), 128))
]),
_: 1
})
]),
_: 1
}, 8, ["value", "modelValue"]));
}
});
export {
T as default
};