UNPKG

epic-designer

Version:

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

47 lines (46 loc) 1.94 kB
import { defineComponent as c, computed as d, createElementBlock as s, openBlock as i, createElementVNode as o, createVNode as u, createCommentVNode as g, unref as t, toDisplayString as f } from "vue"; /* empty css */ /* empty css */ /* empty css */ import { pluginManager as x } from "../../../../../manager/src/pluginManager.js"; /* empty css */ import "vue-draggable-plus"; 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 _ } from "../../../../../hooks/src/designer/useDesignerContext.js"; import { usePageManager as E } from "../../../../../hooks/src/designer/usePageManager.js"; const v = { class: "flex h-full flex-col" }, h = { key: 0, class: "pt-2 text-left" }, V = { class: "text-xs text-red-500" }, q = /* @__PURE__ */ c({ __name: "epScriptEdit", setup(M) { const a = x.component.get("monacoEditor"), l = { minimap: { enabled: !1 }, selectOnLineNumbers: !0, theme: "vs-light" }, r = E(), { pageSchema: n } = _(), p = d(() => r.scriptError.value !== null); return (C, e) => (i(), s("div", v, [ e[1] || (e[1] = o("div", { class: "pb-2" }, [ o("span", null, "自定义函数编辑") ], -1)), u(t(a), { modelValue: t(n).script, "onUpdate:modelValue": e[0] || (e[0] = (m) => t(n).script = m), "auto-toggle-theme": "", class: "ep-editor flex-1", config: l, language: "javascript" }, null, 8, ["modelValue"]), p.value ? (i(), s("div", h, [ o("span", V, " 脚本异常 " + f(t(r).scriptError), 1) ])) : g("", !0) ])); } }); export { q as default };