form-designer-xinyi
Version:
基于vue3的设计器,可视化开发页面表单
36 lines (35 loc) • 1.21 kB
JavaScript
import { defineComponent as a, useAttrs as c, ref as s, openBlock as r, createBlock as i, unref as e, mergeProps as p, withCtx as o, createElementBlock as l, Fragment as d, renderList as _, toDisplayString as x, createVNode as k, createCommentVNode as v, renderSlot as C } from "vue";
import { FormItem as g, Popover as y } from "ant-design-vue";
import { Q as B } from "./QuestionCircleOutlined-Ou8kGTML.js";
const P = /* @__PURE__ */ a({
__name: "formItem",
setup(h) {
const t = c(), m = s(null), f = s([]);
return t.suffix && (f.value = t.suffix.split(`
`).filter((n) => n.trim() !== "")), (n, F) => (r(), i(e(g), p({
ref_key: "form",
ref: m
}, e(t), {
name: e(t).field
}), {
tooltip: o(() => [
e(t).suffix ? (r(), i(e(y), { key: 0 }, {
content: o(() => [
(r(!0), l(d, null, _(f.value, (u) => (r(), l("div", null, x(u), 1))), 256))
]),
default: o(() => [
k(e(B), { class: "ant-form-item__suffix" })
]),
_: 1
})) : v("", !0)
]),
default: o(() => [
C(n.$slots, "default")
]),
_: 3
}, 16, ["name"]));
}
});
export {
P as default
};