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