UNPKG

gepic

Version:

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

34 lines (33 loc) 984 B
import { defineComponent as a, ref as i, createBlock as u, renderSlot as m, openBlock as d, unref as l, mergeProps as c, withCtx as I } from "vue"; import { pluginManager as F } from "../../../../utils/manager/pluginManager.js"; import "@vueuse/core"; import "../../../../hooks/store/index.js"; const M = /* @__PURE__ */ a({ inheritAttrs: !1, __name: "dynamicFormItem", props: { hasFormItem: { type: Boolean }, formItemProps: {} }, emits: ["updateFormItemRef"], setup(r, { emit: n }) { const f = F.getComponent("form-item"), e = r, s = n, t = i(), p = () => { s("updateFormItemRef", t.value); }; return (o, y) => e.hasFormItem ? (d(), u(l(f), c({ key: 0, ref_key: "formItemRef", ref: t }, e.formItemProps, { onVnodeMounted: p }), { default: I(() => [ m(o.$slots, "default") ]), _: 3 }, 16, ["onVnodeMounted"])) : m(o.$slots, "default", { key: 1 }); } }); export { M as default };