UNPKG

epic-designer-gold

Version:

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

44 lines (43 loc) 1.57 kB
import { defineComponent as m, ref as f, onMounted as v, openBlock as g, createElementBlock as V, createVNode as b, unref as n, isRef as k } from "vue"; import { p as t, E as c } from "./pluginManager-BCnrHPYv.js"; import { g as D } from "./index-kTMEQOpq.js"; import { u as S } from "./index-B1s67XDZ.js"; const _ = { class: "" }, N = /* @__PURE__ */ m({ __name: "index", props: { tree: { type: Boolean }, modelValue: {}, dynamicId: {}, type: {} }, emits: ["update:modelValue", "update:EOptionsEditor"], setup(r, { emit: u }) { const s = t.getComponent("select"), { t: p } = S(), i = r, l = f([]), a = D(i, "dynamicId", u); return c.on("deleteSourceData", (e) => { a.value === e && (a.value = ""); }), c.on("updateSource", (e) => { console.log("%c [ ]-45", "font-size:13px; background:pink; color:#bf2c9f;", t.sourceData), l.value = t.sourceData.map((o) => ({ ...o, label: o.apiName, value: o.id })); }), v(() => { console.log("%c [ ]-55", "font-size:13px; background:pink; color:#bf2c9f;", t.sourceData), l.value = t.sourceData.map((e) => ({ ...e, label: e.apiName, value: e.id })); }), (e, o) => (g(), V("div", _, [ b(n(s), { modelValue: n(a), "onUpdate:modelValue": o[0] || (o[0] = (d) => k(a) ? a.value = d : null), placeholder: n(p)("pleaseSelectDataSource"), clearable: "", options: l.value }, null, 8, ["modelValue", "placeholder", "options"]) ])); } }); export { N as default };