UNPKG

epic-designer-cjh

Version:

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

36 lines (35 loc) 1.18 kB
import { defineComponent as i, ref as l, inject as _, watch as p, toRaw as u, openBlock as f, createElementBlock as m, createVNode as g, unref as a } from "vue"; import { p as h, n as N, e as k } from "./index-97ce4605.js"; import { _ as v } from "./_plugin-vue_export-helper-dad06003.js"; const x = { class: "epic-sound-code" }, y = /* @__PURE__ */ i({ __name: "index", setup(E) { const c = h.getComponent("monacoEditor"), d = l(null), o = _("designer"); let t = {}; p(() => o.state.checkedNode, (e) => { var n; N(t, u(e)) || (n = d.value) == null || n.setValue(JSON.stringify(e, null, 2)); }, { deep: !0 }); const s = JSON.stringify(o.state.checkedNode, null, 2); function r(e) { if (!o.state.checkedNode) return !1; t = JSON.parse(e), k(o.state.checkedNode, t); } return (e, n) => (f(), m("div", x, [ g(a(c), { ref_key: "monacoEditorRef", ref: d, class: "editor", "model-value": a(s), "onUpdate:modelValue": r }, null, 8, ["model-value"]) ])); } }); const C = /* @__PURE__ */ v(y, [["__scopeId", "data-v-3d6f39b6"]]); export { C as default };