UNPKG

epic-designer

Version:

基于vue3的设计器,可视化开发页面表单

47 lines (46 loc) 1.54 kB
import { defineComponent as s, createBlock as c, renderSlot as r, openBlock as i, unref as d, mergeProps as f, withCtx as l } from "vue"; /* empty css */ /* empty css */ /* empty css */ import { pluginManager as I } from "../../../../manager/src/pluginManager.js"; /* empty css */ import "vue-draggable-plus"; import "../../../../git/epic/epic-designer/node_modules/.pnpm/jsep@1.4.0/node_modules/jsep/dist/jsep.js"; import "@vueuse/core"; import "../../../../hooks/src/store/index.js"; import { usePageManager as h } from "../../../../hooks/src/designer/usePageManager.js"; const x = /* @__PURE__ */ s({ inheritAttrs: !1, __name: "dynamicFormItem", props: { checkPayload: {}, formItemProps: {}, hasFormItem: { type: Boolean } }, setup(m) { const o = m, n = h(), a = I.component.get("form-item"), p = (e) => { e.component && n.addComponentInstance( `${o.formItemProps.id}_formItem`, e.component ); }; return (e, u) => { var t; return o.hasFormItem ? (i(), c(d(a), f({ key: 0, "check-payload": o.checkPayload }, o.formItemProps, { class: { "ep-hidden": (t = o.formItemProps.props) == null ? void 0 : t.hidden }, onVnodeMounted: p }), { default: l(() => [ r(e.$slots, "default") ]), _: 3 }, 16, ["check-payload", "class"])) : r(e.$slots, "default", { key: 1 }); }; } }); export { x as default };