epic-designer-gold
Version:
基于vue3的设计器,可视化开发页面表单
48 lines (47 loc) • 1.9 kB
JavaScript
import { defineComponent as d, computed as v, ref as _, shallowRef as f, openBlock as l, createElementBlock as o, createElementVNode as a, Fragment as h, renderList as C, normalizeClass as r, createVNode as k, unref as b, toDisplayString as g, createBlock as y, resolveDynamicComponent as x } from "vue";
import { p as B } from "./pluginManager-BNLy8dPz.js";
import { _ as N } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
import { a as z } from "./index-B1s67XDZ.js";
const E = { class: "flex relative" }, w = { class: "epic-action-bar" }, D = { class: "epic-actions-container" }, V = ["title", "onClick"], $ = { class: "epic-sidebar-container" }, S = /* @__PURE__ */ d({
name: "EActivityBar",
__name: "index",
setup(A) {
const p = v(() => (z.get("saas-locale") || "zh-CN") === "zh-CN"), u = v(() => B.viewsContainers.activitybars.value.filter((t) => t.visible)), e = _(0), i = f(null);
i.value = u.value[0].component;
function m(t, s) {
if (e.value === s)
return e.value = null, !1;
i.value = t.component, e.value = s;
}
return (t, s) => (l(), o("div", E, [
a("div", w, [
a("ul", D, [
(l(!0), o(h, null, C(u.value, (n, c) => (l(), o("li", {
key: c,
class: r(["epic-action-item", { checked: e.value === c }]),
title: n.title,
onClick: (F) => m(n, c)
}, [
k(b(N), {
class: "relative",
name: n.icon
}, null, 8, ["name"]),
a("div", {
class: r([p.value ? "text-14px" : "text-12px"])
}, g(n.title), 3)
], 10, V))), 128))
])
]),
a("div", {
class: r(["epic-left-sidebar", { hide: e.value === null }])
}, [
a("div", $, [
(l(), y(x(i.value)))
])
], 2)
]));
}
});
export {
S as default
};