@wetspace/pro-components
Version:
::: tip 基本介绍
58 lines (57 loc) • 1.63 kB
JavaScript
import { defineComponent as i, shallowRef as d, inject as _, computed as v, onMounted as h, onUnmounted as S, openBlock as s, createElementBlock as k, Fragment as P, createVNode as l, unref as t, mergeProps as c, createBlock as w, Teleport as y, withDirectives as C, withCtx as I, renderSlot as g, vShow as B, createCommentVNode as F } from "vue";
import $ from "../index.vue.mjs";
import { stepProps as b, ElStep as j } from "element-plus";
import { SymbolState as x } from "./symbol.mjs";
import E from "../../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/esm-browser/v4.mjs";
const O = /* @__PURE__ */ i({
__name: "item",
props: {
...b,
formPorps: {
type: Object
},
name: String
},
setup(f) {
const o = E(), r = d(), {
divRef: n,
activeCreateFormUid: m,
showStepForm: a
} = _(x, {}), p = f, u = v(() => {
const e = { ...p };
return delete e.formPorps, e;
});
return h(() => {
m.value.push({
uid: o,
formIns: r
});
}), S(() => {
m.value = m.value.filter((e) => e.uid !== o);
}), (e, N) => (s(), k(P, null, [
l(t(j), c(u.value, {
ref_key: "stepItem",
ref: r
}), null, 16),
t(n) ? (s(), w(y, {
key: 0,
to: t(n)
}, [
C(l($, c({
ref_key: "stepItem",
ref: r
}, p.formPorps), {
default: I(() => [
g(e.$slots, "default")
]),
_: 3
}, 16), [
[B, t(a) === t(o)]
])
], 8, ["to"])) : F("", !0)
], 64));
}
});
export {
O as default
};