UNPKG

epic-designer

Version:

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

80 lines (79 loc) 2.7 kB
import { defineComponent as E, computed as c, createElementBlock as l, openBlock as r, createCommentVNode as C, createBlock as B, unref as m } from "vue"; /* empty css */ /* empty css */ /* empty css */ import { pluginManager as u } from "../../../../../manager/src/pluginManager.js"; /* empty css */ import "vue-draggable-plus"; import { getValueByPath as k, setValueByPath as h } from "../../../../../utils/src/common/data.js"; import "../../../../../git/epic/epic-designer/node_modules/.pnpm/jsep@1.4.0/node_modules/jsep/dist/jsep.js"; import "@vueuse/core"; import "../../../../../hooks/src/store/index.js"; import { useDesignerContext as N } from "../../../../../hooks/src/designer/useDesignerContext.js"; const V = { class: "epic-event-view" }, U = { key: 0 }, b = /* @__PURE__ */ E({ __name: "event", setup(L) { const n = N(), a = n.revoke, v = u.component.get("EActionEditor"), f = u.component.getComponentConfigs(), o = c(() => n.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 p, s, d; const t = [ { events: y, title: "生命周期" } ], e = (p = n.state.selectedNode) == null ? void 0 : p.type, i = ((d = (s = f[e ?? ""]) == null ? void 0 : s.config) == null ? void 0 : d.event) ?? []; return t.unshift({ events: i, title: "组件事件" }), t; }); function g(t, e) { h(o.value, e, t), a.push("属性编辑"); } return (t, e) => (r(), l("div", V, [ o.value ? (r(), l("div", U, [ (r(), B(m(v), { key: o.value.id, "event-list": _.value, "model-value": m(k)(o.value, "on"), "onUpdate:modelValue": e[0] || (e[0] = (i) => g(i, "on")) }, null, 8, ["event-list", "model-value"])) ])) : C("", !0) ])); } }); export { b as default };