@pubinfo-pr/core 0.203.2 → 0.203.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AppSetting-B7mE7iHt.js → AppSetting-7jlhUzze.js} +15 -15
- package/dist/{HCheckList-DAkb0SBD.js → HCheckList-cPBgATmv.js} +1 -1
- package/dist/HSlideover-DVQDc9q6.js +3151 -0
- package/dist/{PreferencesContent-CWHTBvHQ.js → PreferencesContent-BAIH81yS.js} +5 -5
- package/dist/{SettingBreadcrumb-p3hD9w-9.js → SettingBreadcrumb-O9-PhAFT.js} +4 -4
- package/dist/{SettingCopyright-BgWvocrJ.js → SettingCopyright-DIKsWTuf.js} +3 -3
- package/dist/{SettingEnableTransition-Cf57pLUk.js → SettingEnableTransition-61O7W00b.js} +2 -2
- package/dist/{SettingHome-tNMtRHoT.js → SettingHome-Sv65TPH8.js} +4 -4
- package/dist/{SettingMenu-Du4Xhle1.js → SettingMenu-BvwJOUZV.js} +5 -5
- package/dist/{SettingMode-DGWqKJHt.js → SettingMode-B8H_eQc8.js} +1 -1
- package/dist/{SettingNavSearch-C_8VmQmD.js → SettingNavSearch-BHsmYBA7.js} +3 -3
- package/dist/{SettingOther-B9iOz69R.js → SettingOther-CyyNnaDX.js} +4 -4
- package/dist/{SettingPage-C0TfmEKp.js → SettingPage-B82lW41P.js} +2 -2
- package/dist/{SettingTabbar-C7ZQrcN4.js → SettingTabbar-Bky2xvH-.js} +5 -5
- package/dist/{SettingThemes-022eXO9f.js → SettingThemes-CkdzS1xt.js} +2 -2
- package/dist/{SettingToolbar-Bh9aXNpl.js → SettingToolbar-CD4qns1J.js} +3 -3
- package/dist/{SettingTopbar-DjB1Izhm.js → SettingTopbar-1shjoe3s.js} +5 -5
- package/dist/{SettingWidthMode-D7sRlBUK.js → SettingWidthMode-DlG6lXjA.js} +2 -2
- package/dist/{auth-B65CJEOe.js → auth-BLGKOyc5.js} +193 -3
- package/dist/{change-organization-sU8aNfhI.js → change-organization-hsqeSzDu.js} +2 -2
- package/dist/{change-password-Dxzhg43p.js → change-password-EtccCDRX.js} +2 -2
- package/dist/{components-emseuaQx.js → components-DFNyaAb9.js} +4 -4
- package/dist/index.js +885 -413
- package/dist/{not-found-DbHOY5cU.js → not-found-BCjngLzt.js} +1 -1
- package/dist/{not-permission-DwERxb_u.js → not-permission-C26vTMvf.js} +1 -1
- package/dist/{profile-Dq66-Gsl.js → profile-BVXIFuBG.js} +1 -1
- package/dist/style.css +1 -1
- package/package.json +7 -7
- package/src/built-in/layout-component/components/Header/HeaderMenu.vue +2 -3
- package/dist/HSlideover-CXBJxuQo.js +0 -1695
- package/dist/HeaderFullMenu-l2890Bzo.js +0 -250
- package/dist/HeaderThinMenu-5K6HXiQk.js +0 -438
- package/dist/overlayscrollbars-vue-mGyICRMi.js +0 -1460
- /package/dist/{HDivider-Ds5MMqtm.js → HDivider-BwvBr5OE.js} +0 -0
- /package/dist/{HInput-BrsX9848.js → HInput-KJ5nFBpF.js} +0 -0
- /package/dist/{HToggle-DEwBoDsw.js → HToggle-Ce_2-yhZ.js} +0 -0
- /package/dist/{core-4H5JBsa5.js → core-DJIGzMMM.js} +0 -0
- /package/dist/{engine-oniguruma-uxNZ2DGJ.js → engine-oniguruma-CaNXwGSv.js} +0 -0
- /package/dist/{json-CC4oV-bd.js → json-Bu_Zprin.js} +0 -0
- /package/dist/{question-line-D7ecIumZ.js → question-line-BG__Ycfv.js} +0 -0
- /package/dist/{reload-CbuQgTlC.js → reload-DHx5Vwus.js} +0 -0
- /package/dist/{right-DYiPS7dU.js → right-BxBlFUwj.js} +0 -0
- /package/dist/{vitesse-dark-CxkWMfh6.js → vitesse-dark-CTe40QT_.js} +0 -0
- /package/dist/{vitesse-light-DY25e6F3.js → vitesse-light-BWXC_WeB.js} +0 -0
- /package/dist/{wasm-DAU6f5s5.js → wasm-2zDVqo-C.js} +0 -0
|
@@ -1,438 +0,0 @@
|
|
|
1
|
-
import { n as __exportAll } from "./chunk-CD4vhpVs.js";
|
|
2
|
-
import { n as api } from "./modal-Bl5xHbxa.js";
|
|
3
|
-
import { d as useTimeoutFn } from "./dist-7OjQvlya.js";
|
|
4
|
-
import { a as PubinfoIcon_default } from "./components-emseuaQx.js";
|
|
5
|
-
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-sUTDUeGO.js";
|
|
6
|
-
import { n as useContext } from "./useContext-DLtu9F7E.js";
|
|
7
|
-
import { t as P } from "./overlayscrollbars-vue-mGyICRMi.js";
|
|
8
|
-
import { usePartyLogin } from "./index.js";
|
|
9
|
-
import { Fragment, Teleport, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, guardReactiveProps, inject, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, openBlock, provide, reactive, ref, renderList, renderSlot, resolveComponent, shallowRef, toDisplayString, toHandlers, unref, watch, withCtx, withModifiers } from "vue";
|
|
10
|
-
import { useRoute, useRouter } from "vue-router";
|
|
11
|
-
var _hoisted_1$1 = { class: "relative inline-flex" }, _hoisted_2 = {
|
|
12
|
-
key: 0,
|
|
13
|
-
class: "absolute left-[50%] top-0 z-20 whitespace-nowrap rounded-full bg-ui-primary px-1.5 text-xs text-ui-text ring-1 ring-light -translate-y-[50%] dark:ring-dark"
|
|
14
|
-
}, HBadge_default = /* @__PURE__ */ defineComponent({
|
|
15
|
-
__name: "HBadge",
|
|
16
|
-
props: { value: { type: [
|
|
17
|
-
String,
|
|
18
|
-
Number,
|
|
19
|
-
Boolean
|
|
20
|
-
] } },
|
|
21
|
-
setup(e) {
|
|
22
|
-
let t = e, n = computed(() => {
|
|
23
|
-
switch (typeof t.value) {
|
|
24
|
-
case "string": return t.value.length > 0;
|
|
25
|
-
case "number": return t.value > 0;
|
|
26
|
-
case "boolean": return t.value;
|
|
27
|
-
default: return t.value !== void 0 && t.value !== null;
|
|
28
|
-
}
|
|
29
|
-
}), r = ref({
|
|
30
|
-
enterActiveClass: "ease-in-out duration-500",
|
|
31
|
-
enterFromClass: "opacity-0",
|
|
32
|
-
enterToClass: "opacity-100",
|
|
33
|
-
leaveActiveClass: "ease-in-out duration-500",
|
|
34
|
-
leaveFromClass: "opacity-100",
|
|
35
|
-
leaveToClass: "opacity-0"
|
|
36
|
-
});
|
|
37
|
-
return (t, i) => (openBlock(), createElementBlock("div", _hoisted_1$1, [renderSlot(t.$slots, "default"), createVNode(Transition, normalizeProps(guardReactiveProps(unref(r))), {
|
|
38
|
-
default: withCtx(() => [unref(n) ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(e.value), 1)) : createCommentVNode("", !0)]),
|
|
39
|
-
_: 1
|
|
40
|
-
}, 16)]));
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
function createInjectionKey(e) {
|
|
44
|
-
return e;
|
|
45
|
-
}
|
|
46
|
-
const rootMenuInjectionKey = createInjectionKey("rootMenu");
|
|
47
|
-
var _hoisted_1 = ["title"], item_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
48
|
-
name: "MenuItem",
|
|
49
|
-
__name: "item",
|
|
50
|
-
props: {
|
|
51
|
-
uniqueKey: {},
|
|
52
|
-
item: {},
|
|
53
|
-
level: { default: 0 },
|
|
54
|
-
subMenu: {
|
|
55
|
-
type: Boolean,
|
|
56
|
-
default: !1
|
|
57
|
-
},
|
|
58
|
-
expand: {
|
|
59
|
-
type: Boolean,
|
|
60
|
-
default: !1
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
setup(e, { expose: t }) {
|
|
64
|
-
let n = e, i = inject(rootMenuInjectionKey), { generateTitle: o } = useContext(), s = ref(), c = computed(() => n.subMenu ? i.subMenus[n.uniqueKey[n.uniqueKey.length - 1]]?.active : i.activeIndex === n.uniqueKey[n.uniqueKey.length - 1]), l = computed(() => c.value && (!n.subMenu || i.isMenuPopup)), d = computed(() => {
|
|
65
|
-
let e;
|
|
66
|
-
return n.item.meta?.icon && (e = n.item.meta.icon), c.value && (n.item.meta?.activeIcon === "system-point" ? e = "system-point" : n.item.meta?.activeIcon && (e = n.item.meta.activeIcon)), e;
|
|
67
|
-
}), f = computed(() => n.item.meta?.iconOptions), p = computed(() => {
|
|
68
|
-
let e = f.value?.boxType;
|
|
69
|
-
return e && e !== "null" ? e : void 0;
|
|
70
|
-
}), h = computed(() => f.value?.iconColor || void 0), g = computed(() => i.isMenuPopup ? "" : `padding-left: ${32 * (n.level ?? 0)}px`);
|
|
71
|
-
return t({ ref: s }), (t, n) => {
|
|
72
|
-
let a = HBadge_default;
|
|
73
|
-
return openBlock(), createElementBlock("div", {
|
|
74
|
-
ref_key: "itemRef",
|
|
75
|
-
ref: s,
|
|
76
|
-
class: normalizeClass(["menu-item relative transition-all", {
|
|
77
|
-
active: unref(l),
|
|
78
|
-
"px-2 py-1": unref(i).props.rounded,
|
|
79
|
-
"px-1! py-2!": unref(i).props.rounded && unref(i).isMenuPopup && e.level === 0 && unref(i).props.mode === "horizontal"
|
|
80
|
-
}])
|
|
81
|
-
}, [createElementVNode("div", {
|
|
82
|
-
class: normalizeClass(["group menu-item-container h-full w-full flex cursor-pointer items-center justify-between gap-1 px-5 py-14px text-[var(--g-sub-sidebar-menu-color)] transition-all hover:(bg-[var(--g-sub-sidebar-menu-hover-bg)] text-[var(--g-sub-sidebar-menu-hover-color)])", {
|
|
83
|
-
"text-[var(--g-sub-sidebar-menu-active-color)]! bg-[var(--g-sub-sidebar-menu-active-bg)]!": unref(l),
|
|
84
|
-
"rounded-2": unref(i).props.rounded,
|
|
85
|
-
"px-2!": unref(i).isMenuPopup && e.level === 0,
|
|
86
|
-
"py-3!": unref(i).props.rounded && unref(i).isMenuPopup && e.level !== 0
|
|
87
|
-
}]),
|
|
88
|
-
title: unref(o)(e.item.meta?.title)
|
|
89
|
-
}, [createElementVNode("div", {
|
|
90
|
-
class: normalizeClass(["menu-item-container-layout inline-flex flex-1 items-center justify-center gap-[12px]", {
|
|
91
|
-
"flex-col gap-none": unref(i).isMenuPopup && e.level === 0,
|
|
92
|
-
"flex-col gap-[2px]!": unref(i).isMenuPopup && e.level === 0 && unref(i).props.showCollapseName,
|
|
93
|
-
"w-full": unref(i).isMenuPopup && e.level === 0 && unref(i).props.showCollapseName && unref(i).props.mode === "vertical",
|
|
94
|
-
"w-[50px]": unref(i).isMenuPopup && e.level === 0 && unref(i).props.showCollapseName && unref(i).props.mode === "horizontal"
|
|
95
|
-
}]),
|
|
96
|
-
style: normalizeStyle(unref(g))
|
|
97
|
-
}, [
|
|
98
|
-
unref(d) && unref(d) !== "system-point" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [unref(f) && unref(p) ? (openBlock(), createBlock(unref(PubinfoIcon_default), {
|
|
99
|
-
key: 0,
|
|
100
|
-
small: "",
|
|
101
|
-
name: unref(d),
|
|
102
|
-
box: unref(p),
|
|
103
|
-
size: 20,
|
|
104
|
-
"icon-size": unref(f)?.iconSize,
|
|
105
|
-
angle: unref(f)?.angle,
|
|
106
|
-
background: unref(f)?.background,
|
|
107
|
-
radius: unref(f)?.radius,
|
|
108
|
-
color: (unref(d) || "").startsWith("antd:") ? unref(h) || "#ffffff" : void 0,
|
|
109
|
-
class: "menu-item-container-icon transition-transform group-hover:scale-115"
|
|
110
|
-
}, null, 8, [
|
|
111
|
-
"name",
|
|
112
|
-
"box",
|
|
113
|
-
"icon-size",
|
|
114
|
-
"angle",
|
|
115
|
-
"background",
|
|
116
|
-
"radius",
|
|
117
|
-
"color"
|
|
118
|
-
])) : (openBlock(), createBlock(unref(PubinfoIcon_default), {
|
|
119
|
-
key: 1,
|
|
120
|
-
name: unref(d),
|
|
121
|
-
size: 20,
|
|
122
|
-
color: (unref(d) || "").startsWith("antd:") ? unref(h) : void 0,
|
|
123
|
-
class: "menu-item-container-icon transition-transform group-hover:scale-115"
|
|
124
|
-
}, null, 8, ["name", "color"]))], 64)) : createCommentVNode("", !0),
|
|
125
|
-
unref(i).isMenuPopup && e.level === 0 && !unref(i).props.showCollapseName ? createCommentVNode("", !0) : (openBlock(), createElementBlock("span", {
|
|
126
|
-
key: 1,
|
|
127
|
-
class: normalizeClass(["title w-0 flex-1 truncate text-sm transition-height transition-opacity transition-width", {
|
|
128
|
-
"opacity-0 w-0 h-0": unref(i).isMenuPopup && e.level === 0 && !unref(i).props.showCollapseName,
|
|
129
|
-
"w-full text-center": unref(i).isMenuPopup && e.level === 0 && unref(i).props.showCollapseName,
|
|
130
|
-
"system-point": unref(d) === "system-point" && unref(l)
|
|
131
|
-
}])
|
|
132
|
-
}, toDisplayString(unref(o)(e.item.meta?.title)), 3)),
|
|
133
|
-
e.item.meta?.badge ? (openBlock(), createBlock(a, {
|
|
134
|
-
key: 2,
|
|
135
|
-
value: typeof e.item.meta.badge == "function" ? e.item.meta.badge() : e.item.meta.badge,
|
|
136
|
-
class: normalizeClass(["badge", { "opacity-0": unref(i).isMenuPopup && e.level === 0 }])
|
|
137
|
-
}, null, 8, ["value", "class"])) : createCommentVNode("", !0)
|
|
138
|
-
], 6), e.subMenu && !(unref(i).isMenuPopup && e.level === 0) ? (openBlock(), createElementBlock("i", {
|
|
139
|
-
key: 0,
|
|
140
|
-
class: normalizeClass(["sharp-corner", [
|
|
141
|
-
e.expand ? "before:-rotate-45 before:-translate-x-[2px] after:rotate-45 after:translate-x-[2px]" : "before:rotate-45 before:-translate-x-[2px] after:-rotate-45 after:translate-x-[2px] ",
|
|
142
|
-
unref(i).isMenuPopup && e.level === 0 && "opacity-0",
|
|
143
|
-
unref(i).isMenuPopup && e.level !== 0 && "-rotate-90 -top-[1.5px]"
|
|
144
|
-
]])
|
|
145
|
-
}, null, 2)) : createCommentVNode("", !0)], 10, _hoisted_1)], 2);
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
}), [["__scopeId", "data-v-dd5786b9"]]), sub_default = /* @__PURE__ */ defineComponent({
|
|
149
|
-
name: "SubMenu",
|
|
150
|
-
__name: "sub",
|
|
151
|
-
props: {
|
|
152
|
-
uniqueKey: {},
|
|
153
|
-
menu: {},
|
|
154
|
-
level: { default: 0 }
|
|
155
|
-
},
|
|
156
|
-
setup(e) {
|
|
157
|
-
let t = e, r = t.menu.path ?? JSON.stringify(t.menu), i = shallowRef(), a = shallowRef(), s = inject(rootMenuInjectionKey), u = computed(() => s.openedMenus.includes(t.uniqueKey[t.uniqueKey.length - 1])), f = computed(() => s.isMenuPopup ? {
|
|
158
|
-
enter(e) {
|
|
159
|
-
e.offsetHeight > window.innerHeight && (e.style.height = `${window.innerHeight}px`);
|
|
160
|
-
},
|
|
161
|
-
afterEnter: () => {},
|
|
162
|
-
beforeLeave: (e) => {
|
|
163
|
-
e.style.overflow = "hidden", e.style.maxHeight = `${e.offsetHeight}px`;
|
|
164
|
-
},
|
|
165
|
-
leave: (e) => {
|
|
166
|
-
e.style.maxHeight = "0";
|
|
167
|
-
},
|
|
168
|
-
afterLeave(e) {
|
|
169
|
-
e.style.overflow = "", e.style.maxHeight = "";
|
|
170
|
-
}
|
|
171
|
-
} : {
|
|
172
|
-
enter(e) {
|
|
173
|
-
let t = e.offsetHeight;
|
|
174
|
-
e.style.maxHeight = "0", e.style.overflow = "hidden", e.offsetHeight, e.style.maxHeight = `${t}px`;
|
|
175
|
-
},
|
|
176
|
-
afterEnter(e) {
|
|
177
|
-
e.style.overflow = "", e.style.maxHeight = "";
|
|
178
|
-
},
|
|
179
|
-
beforeLeave(e) {
|
|
180
|
-
e.style.overflow = "hidden", e.style.maxHeight = `${e.offsetHeight}px`;
|
|
181
|
-
},
|
|
182
|
-
leave(e) {
|
|
183
|
-
e.style.maxHeight = "0";
|
|
184
|
-
},
|
|
185
|
-
afterLeave(e) {
|
|
186
|
-
e.style.overflow = "", e.style.maxHeight = "";
|
|
187
|
-
}
|
|
188
|
-
}), p = computed(() => s.isMenuPopup ? {
|
|
189
|
-
enterActiveClass: "ease-in-out duration-300",
|
|
190
|
-
enterFromClass: "opacity-0 translate-x-4",
|
|
191
|
-
enterToClass: "opacity-100",
|
|
192
|
-
leaveActiveClass: "ease-in-out duration-300",
|
|
193
|
-
leaveFromClass: "opacity-100",
|
|
194
|
-
leaveToClass: "opacity-0"
|
|
195
|
-
} : {
|
|
196
|
-
enterActiveClass: "ease-in-out duration-300",
|
|
197
|
-
enterFromClass: "opacity-0",
|
|
198
|
-
enterToClass: "opacity-100",
|
|
199
|
-
leaveActiveClass: "ease-in-out duration-300",
|
|
200
|
-
leaveFromClass: "opacity-100",
|
|
201
|
-
leaveToClass: "opacity-0"
|
|
202
|
-
}), _ = computed(() => {
|
|
203
|
-
let e = !0;
|
|
204
|
-
return t.menu.children ? t.menu.children.every((e) => e.meta?.sidebar === !1) && (e = !1) : e = !1, e;
|
|
205
|
-
});
|
|
206
|
-
function v() {
|
|
207
|
-
s.isMenuPopup && _.value || (_.value ? s.handleSubMenuClick(r, t.uniqueKey) : s.handleMenuItemClick(r, t.menu.meta));
|
|
208
|
-
}
|
|
209
|
-
let y;
|
|
210
|
-
function b() {
|
|
211
|
-
s.isMenuPopup && (s.mouseInMenu = t.uniqueKey, y?.(), {stop: y} = useTimeoutFn(() => {
|
|
212
|
-
if (_.value) s.openMenu(r, t.uniqueKey), nextTick(() => {
|
|
213
|
-
let e = i.value.ref, n = 0, r = 0;
|
|
214
|
-
s.props.mode === "vertical" || t.level !== 0 ? (n = e.getBoundingClientRect().top + e.scrollTop, r = e.getBoundingClientRect().left + e.getBoundingClientRect().width, n + a.value.getElement().offsetHeight > window.innerHeight && (n = window.innerHeight - a.value.getElement().offsetHeight)) : (n = e.getBoundingClientRect().top + e.getBoundingClientRect().height, r = e.getBoundingClientRect().left, n + a.value.getElement().offsetHeight > window.innerHeight && (a.value.getElement().style.height = `${window.innerHeight - n}px`)), a.value.getElement().style.top = `${n}px`, a.value.getElement().style.left = `${r}px`;
|
|
215
|
-
});
|
|
216
|
-
else {
|
|
217
|
-
let e = t.menu.children ? s.subMenus[r].indexPath.at(-1) : s.items[r].indexPath.at(-1);
|
|
218
|
-
s.openMenu(e, s.subMenus[e].indexPath);
|
|
219
|
-
}
|
|
220
|
-
}, 300));
|
|
221
|
-
}
|
|
222
|
-
function x() {
|
|
223
|
-
s.isMenuPopup && (s.mouseInMenu = [], y?.(), {stop: y} = useTimeoutFn(() => {
|
|
224
|
-
s.mouseInMenu.length === 0 ? s.closeMenu(t.uniqueKey) : _.value && (s.mouseInMenu.includes(t.uniqueKey.at(-1)) || s.closeMenu(t.uniqueKey.at(-1)));
|
|
225
|
-
}, 300));
|
|
226
|
-
}
|
|
227
|
-
return (t, n) => {
|
|
228
|
-
let r = resolveComponent("SubMenu");
|
|
229
|
-
return openBlock(), createElementBlock(Fragment, null, [createVNode(item_default, {
|
|
230
|
-
ref_key: "itemRef",
|
|
231
|
-
ref: i,
|
|
232
|
-
"unique-key": e.uniqueKey,
|
|
233
|
-
item: e.menu,
|
|
234
|
-
level: e.level,
|
|
235
|
-
"sub-menu": unref(_),
|
|
236
|
-
expand: unref(u),
|
|
237
|
-
onClick: v,
|
|
238
|
-
onMouseenter: b,
|
|
239
|
-
onMouseleave: x
|
|
240
|
-
}, null, 8, [
|
|
241
|
-
"unique-key",
|
|
242
|
-
"item",
|
|
243
|
-
"level",
|
|
244
|
-
"sub-menu",
|
|
245
|
-
"expand"
|
|
246
|
-
]), unref(_) ? (openBlock(), createBlock(Teleport, {
|
|
247
|
-
key: 0,
|
|
248
|
-
to: "body",
|
|
249
|
-
disabled: !unref(s).isMenuPopup
|
|
250
|
-
}, [createVNode(Transition, mergeProps(unref(p), toHandlers(unref(f))), {
|
|
251
|
-
default: withCtx(() => [unref(u) ? (openBlock(), createBlock(unref(P), {
|
|
252
|
-
key: 0,
|
|
253
|
-
ref_key: "subMenuRef",
|
|
254
|
-
ref: a,
|
|
255
|
-
options: { scrollbars: { visibility: "hidden" } },
|
|
256
|
-
defer: "",
|
|
257
|
-
class: normalizeClass(["sub-menu", {
|
|
258
|
-
"bg-[var(--g-sub-sidebar-bg)]": unref(s).isMenuPopup,
|
|
259
|
-
"ring-1 ring-stone-2 dark:ring-stone-8 shadow-xl fixed z-3000 w-[200px]": unref(s).isMenuPopup,
|
|
260
|
-
"mx-2": unref(s).isMenuPopup && (unref(s).props.mode === "vertical" || e.level !== 0),
|
|
261
|
-
"rounded-2 py-1": unref(s).props.rounded && unref(s).isMenuPopup
|
|
262
|
-
}])
|
|
263
|
-
}, {
|
|
264
|
-
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(e.menu.children, (t) => (openBlock(), createElementBlock(Fragment, { key: t.path ?? JSON.stringify(t) }, [t.meta?.sidebar === !1 ? createCommentVNode("", !0) : (openBlock(), createBlock(r, {
|
|
265
|
-
key: 0,
|
|
266
|
-
"unique-key": [...e.uniqueKey, t.path ?? JSON.stringify(t)],
|
|
267
|
-
menu: t,
|
|
268
|
-
level: e.level + 1
|
|
269
|
-
}, null, 8, [
|
|
270
|
-
"unique-key",
|
|
271
|
-
"menu",
|
|
272
|
-
"level"
|
|
273
|
-
]))], 64))), 128))]),
|
|
274
|
-
_: 1
|
|
275
|
-
}, 8, ["class"])) : createCommentVNode("", !0)]),
|
|
276
|
-
_: 1
|
|
277
|
-
}, 16)], 8, ["disabled"])) : createCommentVNode("", !0)], 64);
|
|
278
|
-
};
|
|
279
|
-
}
|
|
280
|
-
}), Menu_default = /* @__PURE__ */ defineComponent({
|
|
281
|
-
name: "MainMenu",
|
|
282
|
-
__name: "index",
|
|
283
|
-
props: {
|
|
284
|
-
menu: {},
|
|
285
|
-
value: {},
|
|
286
|
-
accordion: {
|
|
287
|
-
type: Boolean,
|
|
288
|
-
default: !0
|
|
289
|
-
},
|
|
290
|
-
defaultOpeneds: { default: () => [] },
|
|
291
|
-
mode: { default: "vertical" },
|
|
292
|
-
collapse: {
|
|
293
|
-
type: Boolean,
|
|
294
|
-
default: !1
|
|
295
|
-
},
|
|
296
|
-
showCollapseName: {
|
|
297
|
-
type: Boolean,
|
|
298
|
-
default: !1
|
|
299
|
-
},
|
|
300
|
-
rounded: {
|
|
301
|
-
type: Boolean,
|
|
302
|
-
default: !1
|
|
303
|
-
}
|
|
304
|
-
},
|
|
305
|
-
setup(e) {
|
|
306
|
-
let n = e, r = useRouter(), i = ref(n.value), a = ref({}), o = ref({}), c = ref(n.defaultOpeneds.slice(0)), l = ref([]), u = computed(() => n.mode === "horizontal" || n.mode === "vertical" && n.collapse);
|
|
307
|
-
function d(e = [], t = []) {
|
|
308
|
-
e.forEach((e) => {
|
|
309
|
-
let n = e.path ?? JSON.stringify(e);
|
|
310
|
-
if (e.children && e.children.length > 0) {
|
|
311
|
-
let r = [...t, n];
|
|
312
|
-
o.value[n] = {
|
|
313
|
-
index: n,
|
|
314
|
-
indexPath: r,
|
|
315
|
-
active: !1
|
|
316
|
-
}, d(e.children, r);
|
|
317
|
-
} else a.value[n] = {
|
|
318
|
-
index: n,
|
|
319
|
-
indexPath: t
|
|
320
|
-
};
|
|
321
|
-
});
|
|
322
|
-
}
|
|
323
|
-
let f = (e, t) => {
|
|
324
|
-
c.value.includes(e) || (n.accordion && (c.value = c.value.filter((e) => t.includes(e))), c.value.push(e));
|
|
325
|
-
}, p = (e) => {
|
|
326
|
-
if (Array.isArray(e)) {
|
|
327
|
-
nextTick(() => {
|
|
328
|
-
p(e.at(-1)), e.length > 1 && p(e.slice(0, -1));
|
|
329
|
-
});
|
|
330
|
-
return;
|
|
331
|
-
}
|
|
332
|
-
Object.keys(o.value).forEach((t) => {
|
|
333
|
-
o.value[t].indexPath.includes(e) && (c.value = c.value.filter((t) => t !== e));
|
|
334
|
-
});
|
|
335
|
-
};
|
|
336
|
-
function m(e) {
|
|
337
|
-
Object.keys(o.value).forEach((e) => {
|
|
338
|
-
o.value[e].active = !1;
|
|
339
|
-
}), a.value[e]?.indexPath.forEach((e) => {
|
|
340
|
-
o.value[e].active = !0;
|
|
341
|
-
});
|
|
342
|
-
}
|
|
343
|
-
let h = async (e, i) => {
|
|
344
|
-
if (i?.isDev) {
|
|
345
|
-
api.info("暂未上线,敬请期待!");
|
|
346
|
-
return;
|
|
347
|
-
}
|
|
348
|
-
if ((n.mode === "horizontal" || n.collapse) && (c.value = []), m(e), i?.link) {
|
|
349
|
-
let e = i?.partyLogin;
|
|
350
|
-
if (e && Array.isArray(e) && e.length > 0) {
|
|
351
|
-
let { url: t } = await usePartyLogin(e, i.link);
|
|
352
|
-
window.open(t.value);
|
|
353
|
-
} else window.open(i.link);
|
|
354
|
-
return;
|
|
355
|
-
}
|
|
356
|
-
r.push(e);
|
|
357
|
-
}, _ = (e, t) => {
|
|
358
|
-
c.value.includes(e) ? p(e) : f(e, t);
|
|
359
|
-
};
|
|
360
|
-
function v() {
|
|
361
|
-
let e = i.value && a.value[i.value];
|
|
362
|
-
m(i.value), !(!e || n.collapse) && e.indexPath.forEach((e) => {
|
|
363
|
-
let t = o.value[e];
|
|
364
|
-
t && f(e, t.indexPath);
|
|
365
|
-
});
|
|
366
|
-
}
|
|
367
|
-
return watch(() => n.menu, (e) => {
|
|
368
|
-
d(e), v();
|
|
369
|
-
}, {
|
|
370
|
-
deep: !0,
|
|
371
|
-
immediate: !0
|
|
372
|
-
}), watch(() => n.value, (e) => {
|
|
373
|
-
a.value[e] || (i.value = "");
|
|
374
|
-
let t = a.value[e] || i.value && a.value[i.value] || a.value[n.value];
|
|
375
|
-
t ? i.value = t.index : i.value = e, v();
|
|
376
|
-
}), watch(() => n.collapse, (e) => {
|
|
377
|
-
e && (c.value = []), v();
|
|
378
|
-
}), provide(rootMenuInjectionKey, reactive({
|
|
379
|
-
props: n,
|
|
380
|
-
items: a,
|
|
381
|
-
subMenus: o,
|
|
382
|
-
activeIndex: i,
|
|
383
|
-
openedMenus: c,
|
|
384
|
-
mouseInMenu: l,
|
|
385
|
-
isMenuPopup: u,
|
|
386
|
-
openMenu: f,
|
|
387
|
-
closeMenu: p,
|
|
388
|
-
handleMenuItemClick: h,
|
|
389
|
-
handleSubMenuClick: _
|
|
390
|
-
})), (t, r) => (openBlock(), createElementBlock("div", { class: normalizeClass(["flex flex-col of-hidden transition-all", {
|
|
391
|
-
"w-[200px]": !unref(u) && n.mode === "vertical",
|
|
392
|
-
"w-[64px]": unref(u) && n.mode === "vertical",
|
|
393
|
-
"h-[80px]": n.mode === "horizontal",
|
|
394
|
-
"flex-row! w-auto": unref(u) && n.mode === "horizontal"
|
|
395
|
-
}]) }, [(openBlock(!0), createElementBlock(Fragment, null, renderList(e.menu, (e, t) => (openBlock(), createElementBlock(Fragment, { key: t }, [e.children?.length && e.meta?.sidebar !== !1 ? (openBlock(), createBlock(sub_default, {
|
|
396
|
-
key: 0,
|
|
397
|
-
menu: e,
|
|
398
|
-
"unique-key": [e.path ?? JSON.stringify(e)]
|
|
399
|
-
}, null, 8, ["menu", "unique-key"])) : e.meta?.sidebar === !1 ? createCommentVNode("", !0) : (openBlock(), createBlock(item_default, {
|
|
400
|
-
key: 1,
|
|
401
|
-
item: e,
|
|
402
|
-
"unique-key": [e.path ?? JSON.stringify(e)],
|
|
403
|
-
onClick: (t) => h(e.path ?? JSON.stringify(e), e.meta)
|
|
404
|
-
}, null, 8, [
|
|
405
|
-
"item",
|
|
406
|
-
"unique-key",
|
|
407
|
-
"onClick"
|
|
408
|
-
]))], 64))), 128))], 2));
|
|
409
|
-
}
|
|
410
|
-
}), HeaderThinMenu_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
411
|
-
name: "LayoutHeaderThinMenu",
|
|
412
|
-
__name: "HeaderThinMenu",
|
|
413
|
-
setup(e) {
|
|
414
|
-
let t = useRoute(), { settingsStore: n, menuStore: r } = useContext(), i = ref();
|
|
415
|
-
function o(e) {
|
|
416
|
-
i.value.scrollBy({ left: (e.deltaY || e.detail) > 0 ? 50 : -50 });
|
|
417
|
-
}
|
|
418
|
-
return (e, a) => (openBlock(), createElementBlock("div", {
|
|
419
|
-
ref_key: "menuRef",
|
|
420
|
-
ref: i,
|
|
421
|
-
class: "menu-container",
|
|
422
|
-
onWheel: withModifiers(o, ["prevent"])
|
|
423
|
-
}, [createVNode(Menu_default, {
|
|
424
|
-
menu: unref(r).allMenus,
|
|
425
|
-
value: unref(t).meta.activeMenu || unref(t).path,
|
|
426
|
-
mode: "horizontal",
|
|
427
|
-
"show-collapse-name": "",
|
|
428
|
-
rounded: unref(n).settings.menu.isRounded,
|
|
429
|
-
class: normalizeClass(["menu", { [`menu-active-${unref(n).settings.menu.menuActiveStyle}`]: unref(n).settings.menu.menuActiveStyle !== "" }])
|
|
430
|
-
}, null, 8, [
|
|
431
|
-
"menu",
|
|
432
|
-
"value",
|
|
433
|
-
"rounded",
|
|
434
|
-
"class"
|
|
435
|
-
])], 544));
|
|
436
|
-
}
|
|
437
|
-
}), HeaderThinMenu_exports = /* @__PURE__ */ __exportAll({ default: () => HeaderThinMenu_default }), HeaderThinMenu_default = HeaderThinMenu_vue_vue_type_script_setup_true_lang_default;
|
|
438
|
-
export { HeaderThinMenu_exports as n, Menu_default as r, HeaderThinMenu_default as t };
|