UNPKG

fx-epic-designer

Version:

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

75 lines (74 loc) 2.3 kB
import { defineComponent as E, inject as p, computed as c, createElementBlock as l, openBlock as i, createCommentVNode as C, createBlock as B, unref as a } from "vue"; /* empty css */ import "vuedraggable"; import { getValueByPath as k, setValueByPath as h } from "../../../../../utils/src/common/data.js"; import "@vueuse/core"; import "../../../../../hooks/src/store/index.js"; import { pluginManager as u } from "../../../../../utils/src/manager/pluginManager.js"; const N = { class: "epic-event-view" }, V = { key: 0 }, j = /* @__PURE__ */ E({ __name: "event", setup(U) { const d = p("designer"), v = p("revoke"), m = u.getComponent("EActionEditor"), f = u.getComponentConfings(), o = c(() => d.state.selectedNode), y = [ { description: "挂载完成(全部组件)", type: "epicReady" }, { description: "挂载完成(本组件)", type: "vnodeMounted" }, { description: "更新完成", type: "vnodeUpdated" }, { description: "卸载完成", type: "vnodeUnmounted" }, { description: "挂载前", type: "vnodeBeforeMount" }, { description: "更新前", type: "vnodeBeforeUpdate" }, { description: "卸载前", type: "vnodeBeforeUnmount" }, { description: "错误捕获", type: "vnodeErrorCaptured" } ], _ = c(() => { var s, r; const t = [ { events: y, title: "生命周期" } ], e = (s = d.state.selectedNode) == null ? void 0 : s.type, n = ((r = f[e ?? ""]) == null ? void 0 : r.config.event) ?? []; return t.unshift({ events: n, title: "组件事件" }), t; }); function g(t, e) { h(o.value, e, t), v.push("编辑组件属性"); } return (t, e) => (i(), l("div", N, [ o.value ? (i(), l("div", V, [ (i(), B(a(m), { key: o.value.id, "event-list": _.value, "model-value": a(k)(o.value, "on"), "onUpdate:modelValue": e[0] || (e[0] = (n) => g(n, "on")) }, null, 8, ["event-list", "model-value"])) ])) : C("", !0) ])); } }); export { j as default };