UNPKG

snowy-designer

Version:

基于Epic-Designer-Pro版本的设计器,可视化开发页面表单

85 lines (84 loc) 2.49 kB
import { defineComponent as V, computed as g, createElementBlock as l, openBlock as r, createElementVNode as a, Fragment as k, renderList as C, createVNode as m, createCommentVNode as y, unref as i } from "vue"; /* empty css */ import U from "../../../../base-ui/src/components/icon/icon.vue.js"; import "radix-vue"; import "clsx"; import "tailwind-merge"; import "lucide-vue-next"; import "../../../../base-ui/src/shadch-ui/button/index.js"; import "@vueuse/core"; import "../../../../base-ui/src/shadch-ui/toast/index.js"; import { getUUID as P } from "../../../../../utils/src/common/string.js"; import "../../../../../hooks/src/store/index.js"; import "lodash"; import { pluginManager as b } from "../../../../../utils/src/manager/pluginManager.js"; import "monaco-editor"; import "../../../../../utils/src/request/index.js"; import "vuedraggable"; const E = { key: 0, class: "epic-del-btn" }, N = ["onClick"], O = /* @__PURE__ */ V({ __name: "index", props: { modelValue: { default: () => [], type: Array } }, emits: ["update:modelValue"], setup(c, { emit: s }) { const u = c, d = s, v = b.getComponent("number"), t = g({ get() { return u.modelValue; }, set(e) { d("update:modelValue", e); } }); function f() { const e = { componentProps: { span: 12 }, id: P(), type: "col", children: [] }; t.value.push(e); } function _(e) { t.value = t.value.filter((h, o) => e !== o); } return (e, h) => (r(), l("div", null, [ (r(!0), l(k, null, C(t.value, (o, p) => (r(), l("div", { key: p, class: "EColEditor-item" }, [ m(i(v), { value: o.componentProps.span, "onUpdate:value": (n) => o.componentProps.span = n, modelValue: o.componentProps.span, "onUpdate:modelValue": (n) => o.componentProps.span = n, style: { width: "100%" }, min: 1, max: 24 }, null, 8, ["value", "onUpdate:value", "modelValue", "onUpdate:modelValue"]), t.value.length > 1 ? (r(), l("div", E, [ a("span", { onClick: (n) => _(p) }, [ m(i(U), { name: "icon-shanchu1" }) ], 8, N) ])) : y("", !0) ]))), 128)), a("div", { class: "add-btn", onClick: f }, "添加") ])); } }); export { O as default };