gepic
Version:
基于vue3的设计器,可视化开发页面表单
87 lines (86 loc) • 2.89 kB
JavaScript
import { defineComponent as h, inject as x, createElementBlock as _, openBlock as g, createElementVNode as e, renderSlot as i, createTextVNode as r, toDisplayString as v, unref as n, createVNode as o, withCtx as c } from "vue";
import $ from "../../../../../static/logo.png.js";
import { pluginManager as k } from "../../../../../../utils/manager/pluginManager.js";
import "@vueuse/core";
import "../../../../../../hooks/store/index.js";
import m from "../../../../icon/src/icon.vue.js";
const w = { class: "epic-header relative" }, C = { class: "epic-header-item flex-1 items-center flex" }, y = { class: "epic-header-item flex-1 flex justify-center text-12px" }, b = { class: "epic-header-item flex-1 flex justify-end items-center" }, j = { class: "flex! items-center h-full" }, z = { class: "ml-2" }, B = { class: "flex! items-center h-full" }, M = /* @__PURE__ */ h({
__name: "index",
emits: ["save", "reset", "preview"],
setup(E, { emit: p }) {
const l = p, a = k.getComponent("button"), d = x("designerProps");
function f() {
l("preview");
}
function u() {
l("save");
}
return (s, t) => (g(), _("header", w, [
e("div", C, [
i(s.$slots, "prefix", {}, () => [
t[0] || (t[0] = e("a", {
class: "decoration-none items-center flex",
href: "https://github.com/Kchengz/epic-designer",
target: "_blank"
}, [
e("img", {
src: $,
class: "w-18px h-18px",
alt: "",
srcset: ""
}),
e("span", { class: "ml-3" }, "EpicDesigner")
], -1))
])
]),
e("div", y, [
i(s.$slots, "title", {}, () => [
r(v(n(d).title), 1)
])
]),
e("div", b, [
i(s.$slots, "right-prefix"),
i(s.$slots, "right-action", {}, () => [
e("div", null, [
o(n(a), {
size: "small",
onClick: f
}, {
default: c(() => [
e("span", j, [
o(n(m), {
name: "icon--epic--eye",
class: "mr-4px"
}),
t[1] || (t[1] = r(" 预览 "))
])
]),
_: 1
})
]),
e("div", z, [
o(n(a), {
size: "small",
onClick: u
}, {
default: c(() => [
e("span", B, [
o(n(m), {
name: "icon--epic--save-outline-rounded",
class: "mr-4px"
}),
t[2] || (t[2] = r(" 保存 "))
])
]),
_: 1
})
])
]),
i(s.$slots, "right-suffix")
])
]));
}
});
export {
M as default
};