UNPKG

gepic

Version:

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

67 lines (66 loc) 2.21 kB
import { defineComponent as y, inject as r, computed as i, createElementBlock as a, openBlock as d, createCommentVNode as b, createBlock as k, unref as u } from "vue"; import { pluginManager as p } from "../../../../../../utils/manager/pluginManager.js"; import "@vueuse/core"; import "../../../../../../hooks/store/index.js"; import { getValueByPath as _, setValueByPath as B } from "../../../../../../utils/common/data.js"; const C = { class: "epic-event-view" }, U = { key: 0 }, x = /* @__PURE__ */ y({ __name: "eventView", setup(E) { const m = r("pageSchema"), s = r("designer"), l = r("revoke"), v = p.getComponent("EActionEditor"), f = p.getComponentConfings(), o = i(() => s.state.checkedNode), g = i(() => { var n, c; const t = [{ title: "生命周期", events: [ { type: "vnodeBeforeMount", describe: "beforeMount" }, { type: "vnodeMounted", describe: "mounted" }, { type: "vnodeBeforeUpdate", describe: "beforeUpdate" }, { type: "vnodeUpdated", describe: "updated" }, { type: "vnodeBeforeUnmount", describe: "beforeUnmount" }, { type: "vnodeUnmounted", describe: "unmounted" }, { type: "vnodeErrorCaptured", describe: "errorCaptured" } ] }], e = ((c = f[((n = s.state.checkedNode) == null ? void 0 : n.type) ?? ""]) == null ? void 0 : c.config.event) ?? []; return t.unshift({ title: "组件事件", events: e }), t; }); function h(t, e) { B(o.value, e, t), l.push(m.schemas, "编辑组件属性"); } return (t, e) => (d(), a("div", C, [ o.value ? (d(), a("div", U, [ (d(), k(u(v), { key: o.value.id, "event-list": g.value, "model-value": u(_)(o.value, "on"), "onUpdate:modelValue": e[0] || (e[0] = (n) => h(n, "on")) }, null, 8, ["event-list", "model-value"])) ])) : b("", !0) ])); } }); export { x as default };