ai-form-designer
Version:
vue3+adv的设计器,可视化开发页面表单
45 lines (44 loc) • 1.74 kB
JavaScript
import { defineComponent as d, computed as p, ref as _, shallowRef as m, 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 { p as g } from "./index-DwcJO-0a.js";
import { _ as x } from "./icon.vue_vue_type_script_setup_true_lang-DW206h_7.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" }, M = /* @__PURE__ */ d({
name: "EActivityBar",
__name: "index",
setup(z) {
const r = p(() => g.viewsContainers.activitybars.value.filter((a) => a.visible)), e = _(0), l = m(null);
l.value = r.value[0].component;
function v(a, c) {
if (e.value === c)
return e.value = null, !1;
l.value = a.component, e.value = c;
}
return (a, c) => (i(), s("div", E, [
t("div", w, [
t("ul", D, [
(i(!0), s(f, null, h(r.value, (n, o) => (i(), s("li", {
key: o,
class: u(["epic-action-item", { checked: e.value === o }]),
title: n.title,
onClick: (A) => v(n, o)
}, [
k(C(x), {
class: "relative",
name: n.icon
}, null, 8, ["name"]),
t("div", V, b(n.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 {
M as default
};