bmp-layout 0.0.20 → 0.0.21
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/bmp-layout.es.js +113 -69
- package/bmp-layout.umd.js +4 -4
- package/package.json +1 -1
- package/style.css +1 -1
package/bmp-layout.es.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { openBlock, createBlock, unref, normalizeClass, nextTick, ref, computed, watch, withCtx, createElementBlock, createElementVNode, normalizeStyle, createVNode, Fragment, defineComponent, isVNode, Teleport, Transition, withModifiers, toDisplayString, renderList, createCommentVNode, resolveComponent, provide, resolveDynamicComponent, onMounted, TransitionGroup, createTextVNode, mergeProps, isRef, onUnmounted, withDirectives, resolveDirective, renderSlot, watchEffect, vShow, useSlots, useAttrs, createSlots, inject, onBeforeUnmount, reactive, onUpdated, render, useCssVars } from "vue";
|
|
2
|
-
import { createPinia, defineStore } from "pinia";
|
|
2
|
+
import { createPinia, setActivePinia, defineStore } from "pinia";
|
|
3
3
|
import piniaPluginPersistedstate from "pinia-plugin-persistedstate";
|
|
4
4
|
import { cloneDeep, omit } from "lodash-es";
|
|
5
|
-
import { ElBacktop, ElIcon, ElMenuItem, ElSubMenu, ElScrollbar, ElMenu, ElInput, ElBadge, ElDropdown, ElDropdownMenu, ElDropdownItem, ElAvatar,
|
|
5
|
+
import { ElBacktop, ElIcon, ElMenuItem, ElSubMenu, ElScrollbar, ElMenu, ElInput, ElBadge, ElDropdown, ElDropdownMenu, ElDropdownItem, ElAvatar, ElBreadcrumb, ElBreadcrumbItem, ElDrawer, ElButton, ElMessage, ElConfigProvider, ElCard, ElPagination, ElDialog, ElAlert, ElAffix, ElImageViewer, ElMessageBox, ElNotification, ElUpload, ElLink, ElAutocomplete, ElButtonGroup, ElCarousel, ElCarouselItem, ElCollapse, ElCollapseItem, ElCollapseTransition, ElDivider, ElEmpty, ElOverlay, ElPageHeader, ElProgress, ElResult, ElSkeleton, ElSkeletonItem, ElSpace, ElTag, ElText, ElCascader, ElCascaderPanel, ElCheckbox, ElCheckboxButton, ElCheckboxGroup, ElColorPicker, ElDatePicker, ElForm, ElFormItem, ElInputNumber, ElInputTag, ElRadio, ElRadioButton, ElRadioGroup, ElRate, ElSelect, ElOption, ElOptionGroup, ElSelectV2, ElSlider, ElSwitch, ElTimePicker, ElTimeSelect, ElTransfer, ElTreeSelect, ElMention, ElCalendar, ElCheckTag, ElCountdown, ElDescriptions, ElDescriptionsItem, ElImage, ElStatistic, ElTable, ElTableColumn, ElTimeline, ElTimelineItem, ElTree, ElTreeV2, ElMenuItemGroup, ElTabs, ElTabPane, ElPopover, ElPopconfirm, ElTooltip, ElContainer, ElAside, ElFooter, ElHeader, ElMain, ElRow, ElCol, ElSplitter, ElSplitterPanel, ElSegmented, ElTour, ElTourStep, ElWatermark, ElPopper, ElAnchor, ElSteps } from "element-plus";
|
|
6
6
|
import { ElAffix as ElAffix2, ElAlert as ElAlert2, ElAnchor as ElAnchor2, ElAside as ElAside2, ElAutocomplete as ElAutocomplete2, ElAvatar as ElAvatar2, ElBacktop as ElBacktop2, ElBadge as ElBadge2, ElBreadcrumb as ElBreadcrumb2, ElBreadcrumbItem as ElBreadcrumbItem2, ElButton as ElButton2, ElButtonGroup as ElButtonGroup2, ElCalendar as ElCalendar2, ElCard as ElCard2, ElCarousel as ElCarousel2, ElCarouselItem as ElCarouselItem2, ElCascader as ElCascader2, ElCascaderPanel as ElCascaderPanel2, ElCheckTag as ElCheckTag2, ElCheckbox as ElCheckbox2, ElCheckboxButton as ElCheckboxButton2, ElCheckboxGroup as ElCheckboxGroup2, ElCol as ElCol2, ElCollapse as ElCollapse2, ElCollapseItem as ElCollapseItem2, ElCollapseTransition as ElCollapseTransition2, ElColorPicker as ElColorPicker2, ElConfigProvider as ElConfigProvider2, ElContainer as ElContainer2, ElCountdown as ElCountdown2, ElDatePicker as ElDatePicker2, ElDescriptions as ElDescriptions2, ElDescriptionsItem as ElDescriptionsItem2, ElDialog as ElDialog2, ElDivider as ElDivider2, ElDrawer as ElDrawer2, ElDropdown as ElDropdown2, ElDropdownItem as ElDropdownItem2, ElDropdownMenu as ElDropdownMenu2, ElEmpty as ElEmpty2, ElFooter as ElFooter2, ElForm as ElForm2, ElFormItem as ElFormItem2, ElHeader as ElHeader2, ElIcon as ElIcon2, ElImage as ElImage2, ElImageViewer as ElImageViewer2, ElInfiniteScroll, ElInput as ElInput2, ElInputNumber as ElInputNumber2, ElInputTag as ElInputTag2, ElLink as ElLink2, ElLoading, ElMain as ElMain2, ElMention as ElMention2, ElMenu as ElMenu2, ElMenuItem as ElMenuItem2, ElMenuItemGroup as ElMenuItemGroup2, ElMessage as ElMessage2, ElMessageBox as ElMessageBox2, ElNotification as ElNotification2, ElOption as ElOption2, ElOptionGroup as ElOptionGroup2, ElOverlay as ElOverlay2, ElPageHeader as ElPageHeader2, ElPagination as ElPagination2, ElPopconfirm as ElPopconfirm2, ElPopover as ElPopover2, ElPopper as ElPopper2, ElProgress as ElProgress2, ElRadio as ElRadio2, ElRadioButton as ElRadioButton2, ElRadioGroup as ElRadioGroup2, ElRate as ElRate2, ElResult as ElResult2, ElRow as ElRow2, ElScrollbar as ElScrollbar2, ElSegmented as ElSegmented2, ElSelect as ElSelect2, ElSelectV2 as ElSelectV22, ElSkeleton as ElSkeleton2, ElSkeletonItem as ElSkeletonItem2, ElSlider as ElSlider2, ElSpace as ElSpace2, ElSplitter as ElSplitter2, ElSplitterPanel as ElSplitterPanel2, ElStatistic as ElStatistic2, ElSteps as ElSteps2, ElSubMenu as ElSubMenu2, ElSwitch as ElSwitch2, ElTabPane as ElTabPane2, ElTable as ElTable2, ElTableColumn as ElTableColumn2, ElTabs as ElTabs2, ElTag as ElTag2, ElText as ElText2, ElTimePicker as ElTimePicker2, ElTimeSelect as ElTimeSelect2, ElTimeline as ElTimeline2, ElTimelineItem as ElTimelineItem2, ElTooltip as ElTooltip2, ElTour as ElTour2, ElTourStep as ElTourStep2, ElTransfer as ElTransfer2, ElTree as ElTree2, ElTreeSelect as ElTreeSelect2, ElTreeV2 as ElTreeV22, ElUpload as ElUpload2, ElWatermark as ElWatermark2 } from "element-plus";
|
|
7
7
|
import { createRouter, createWebHashHistory, useRoute, useRouter } from "vue-router";
|
|
8
8
|
import "vue-i18n";
|
|
9
9
|
import { useClipboard, useWindowSize } from "@vueuse/core";
|
|
10
10
|
let store = createPinia();
|
|
11
11
|
store.use(piniaPluginPersistedstate);
|
|
12
|
+
setActivePinia(store);
|
|
12
13
|
const setPinia = (pinia) => {
|
|
13
14
|
store = pinia;
|
|
14
15
|
};
|
|
@@ -3463,7 +3464,7 @@ try {
|
|
|
3463
3464
|
}
|
|
3464
3465
|
} catch (err) {
|
|
3465
3466
|
}
|
|
3466
|
-
const _hoisted_1$
|
|
3467
|
+
const _hoisted_1$d = ["xlink:href"];
|
|
3467
3468
|
const _hoisted_2$b = ["data-icon"];
|
|
3468
3469
|
const _sfc_main$v = /* @__PURE__ */ Object.assign({ name: "Icon" }, {
|
|
3469
3470
|
__name: "Icon",
|
|
@@ -3545,7 +3546,7 @@ const _sfc_main$v = /* @__PURE__ */ Object.assign({ name: "Icon" }, {
|
|
|
3545
3546
|
key: 0,
|
|
3546
3547
|
class: normalizeClass(unref(getSvgClass))
|
|
3547
3548
|
}, [
|
|
3548
|
-
createElementVNode("use", { "xlink:href": unref(symbolId) }, null, 8, _hoisted_1$
|
|
3549
|
+
createElementVNode("use", { "xlink:href": unref(symbolId) }, null, 8, _hoisted_1$d)
|
|
3549
3550
|
], 2)) : (openBlock(), createElementBlock("span", {
|
|
3550
3551
|
key: 1,
|
|
3551
3552
|
ref_key: "elRef",
|
|
@@ -3837,7 +3838,7 @@ const _sfc_main$t = /* @__PURE__ */ Object.assign({ name: "MenuTrigger" }, {
|
|
|
3837
3838
|
}
|
|
3838
3839
|
});
|
|
3839
3840
|
const MenuTrigger = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-08d82a5c"]]);
|
|
3840
|
-
const _hoisted_1$
|
|
3841
|
+
const _hoisted_1$c = { class: "sidebar-inner" };
|
|
3841
3842
|
const _hoisted_2$a = ["onClick"];
|
|
3842
3843
|
const _hoisted_3$9 = ["onClick"];
|
|
3843
3844
|
const _hoisted_4$7 = ["onClick"];
|
|
@@ -3866,10 +3867,7 @@ const _sfc_main$s = /* @__PURE__ */ Object.assign({ name: "ProductServicePanel"
|
|
|
3866
3867
|
const filterHiddenMenus = (items) => {
|
|
3867
3868
|
if (!items || !Array.isArray(items))
|
|
3868
3869
|
return [];
|
|
3869
|
-
return items.filter((item) => {
|
|
3870
|
-
var _a2;
|
|
3871
|
-
return !((_a2 = item.meta) == null ? void 0 : _a2.hidden);
|
|
3872
|
-
}).map((item) => ({
|
|
3870
|
+
return items.filter((item) => !!item.visible).map((item) => ({
|
|
3873
3871
|
...item,
|
|
3874
3872
|
children: item.children ? filterHiddenMenus(item.children) : []
|
|
3875
3873
|
}));
|
|
@@ -3903,7 +3901,7 @@ const _sfc_main$s = /* @__PURE__ */ Object.assign({ name: "ProductServicePanel"
|
|
|
3903
3901
|
title: ((_a2 = menu.meta) == null ? void 0 : _a2.title) || menu.name,
|
|
3904
3902
|
icon: (_b = menu.meta) == null ? void 0 : _b.icon,
|
|
3905
3903
|
path: menu.path,
|
|
3906
|
-
|
|
3904
|
+
modulePath: menu.modulePath,
|
|
3907
3905
|
children: (menu.children || []).filter((item) => {
|
|
3908
3906
|
var _a3;
|
|
3909
3907
|
return !((_a3 = item.meta) == null ? void 0 : _a3.hidden);
|
|
@@ -3945,7 +3943,7 @@ const _sfc_main$s = /* @__PURE__ */ Object.assign({ name: "ProductServicePanel"
|
|
|
3945
3943
|
activeCategory.value = 0;
|
|
3946
3944
|
};
|
|
3947
3945
|
const handleSelect = (item, parentPath = "") => {
|
|
3948
|
-
var _a2;
|
|
3946
|
+
var _a2, _b;
|
|
3949
3947
|
const fullPath = getAccessiblePath(item, parentPath);
|
|
3950
3948
|
if (fullPath) {
|
|
3951
3949
|
const currentModuleId = permissionStore.getModuleId;
|
|
@@ -3954,7 +3952,9 @@ const _sfc_main$s = /* @__PURE__ */ Object.assign({ name: "ProductServicePanel"
|
|
|
3954
3952
|
router.push(fullPath.startsWith("/") ? fullPath : `/${fullPath}`);
|
|
3955
3953
|
} else {
|
|
3956
3954
|
const currentOrigin = window.location.origin;
|
|
3957
|
-
const
|
|
3955
|
+
const modulePath = ((_b = groupedMenus.value[activeCategory.value]) == null ? void 0 : _b.modulePath) || "";
|
|
3956
|
+
const moduleFullPath = joinPath(modulePath, fullPath);
|
|
3957
|
+
const targetUrl = `${currentOrigin}${moduleFullPath.startsWith("/") ? moduleFullPath : `/${moduleFullPath}`}`;
|
|
3958
3958
|
window.location.href = targetUrl;
|
|
3959
3959
|
}
|
|
3960
3960
|
closePanel();
|
|
@@ -3999,7 +3999,7 @@ const _sfc_main$s = /* @__PURE__ */ Object.assign({ name: "ProductServicePanel"
|
|
|
3999
3999
|
], 2),
|
|
4000
4000
|
createVNode(unref(ElScrollbar), null, {
|
|
4001
4001
|
default: withCtx(() => [
|
|
4002
|
-
createElementVNode("div", _hoisted_1$
|
|
4002
|
+
createElementVNode("div", _hoisted_1$c, [
|
|
4003
4003
|
(openBlock(true), createElementBlock(Fragment, null, renderList(groupedMenus.value, (group, index) => {
|
|
4004
4004
|
return openBlock(), createElementBlock("div", {
|
|
4005
4005
|
key: index,
|
|
@@ -4138,10 +4138,12 @@ const _sfc_main$s = /* @__PURE__ */ Object.assign({ name: "ProductServicePanel"
|
|
|
4138
4138
|
};
|
|
4139
4139
|
}
|
|
4140
4140
|
});
|
|
4141
|
-
const ProductServicePanel = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-
|
|
4141
|
+
const ProductServicePanel = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-e90309ba"]]);
|
|
4142
4142
|
const _sfc_main$r = /* @__PURE__ */ Object.assign({ name: "Logo" }, {
|
|
4143
4143
|
__name: "Logo",
|
|
4144
|
-
|
|
4144
|
+
emits: ["logo-click"],
|
|
4145
|
+
setup(__props, { emit: __emit }) {
|
|
4146
|
+
const emit = __emit;
|
|
4145
4147
|
const { getPrefixCls: getPrefixCls2 } = useDesign();
|
|
4146
4148
|
const prefixCls2 = getPrefixCls2("logo");
|
|
4147
4149
|
const appStore = useAppStore();
|
|
@@ -4155,6 +4157,9 @@ const _sfc_main$r = /* @__PURE__ */ Object.assign({ name: "Logo" }, {
|
|
|
4155
4157
|
const fontColor = computed(() => {
|
|
4156
4158
|
return theme.value === "whiteLight" ? "var(--el-color-primary)" : "#fff";
|
|
4157
4159
|
});
|
|
4160
|
+
const handleClickLogo = () => {
|
|
4161
|
+
emit("logo-click");
|
|
4162
|
+
};
|
|
4158
4163
|
return (_ctx, _cache) => {
|
|
4159
4164
|
const _component_Icon = resolveComponent("Icon");
|
|
4160
4165
|
return openBlock(), createElementBlock("div", null, [
|
|
@@ -4170,21 +4175,26 @@ const _sfc_main$r = /* @__PURE__ */ Object.assign({ name: "Logo" }, {
|
|
|
4170
4175
|
active: panelVisible.value,
|
|
4171
4176
|
onToggle: togglePanel
|
|
4172
4177
|
}, null, 8, ["active"]),
|
|
4173
|
-
createVNode(_component_Icon, {
|
|
4174
|
-
icon: "svg-icon:logo",
|
|
4175
|
-
color: fontColor.value,
|
|
4176
|
-
svgClass: "!w-full !h-full",
|
|
4177
|
-
class: normalizeClass(["!w-[var(--logo-height)]", "!h-[var(--logo-height)]"])
|
|
4178
|
-
}, null, 8, ["color"]),
|
|
4179
4178
|
createElementVNode("div", {
|
|
4180
|
-
class:
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4179
|
+
class: "flex cursor-pointer",
|
|
4180
|
+
onClick: handleClickLogo
|
|
4181
|
+
}, [
|
|
4182
|
+
createVNode(_component_Icon, {
|
|
4183
|
+
icon: "svg-icon:logo",
|
|
4184
|
+
color: fontColor.value,
|
|
4185
|
+
svgClass: "!w-full !h-full",
|
|
4186
|
+
class: normalizeClass(["!w-[var(--logo-height)]", "!h-[var(--logo-height)]"])
|
|
4187
|
+
}, null, 8, ["color"]),
|
|
4188
|
+
createElementVNode("div", {
|
|
4189
|
+
class: normalizeClass([
|
|
4190
|
+
"ml-10px text-16px font-700",
|
|
4191
|
+
{
|
|
4192
|
+
"text-[var(--top-header-text-color)]": ["left", "top", "topLeft"].includes(layout.value)
|
|
4193
|
+
}
|
|
4194
|
+
]),
|
|
4195
|
+
style: normalizeStyle({ color: fontColor.value })
|
|
4196
|
+
}, toDisplayString(title.value), 7)
|
|
4197
|
+
])
|
|
4188
4198
|
], 2),
|
|
4189
4199
|
createVNode(unref(ProductServicePanel), {
|
|
4190
4200
|
visible: panelVisible.value,
|
|
@@ -4194,7 +4204,7 @@ const _sfc_main$r = /* @__PURE__ */ Object.assign({ name: "Logo" }, {
|
|
|
4194
4204
|
};
|
|
4195
4205
|
}
|
|
4196
4206
|
});
|
|
4197
|
-
const _hoisted_1$
|
|
4207
|
+
const _hoisted_1$b = { class: "w-full min-w-1000px" };
|
|
4198
4208
|
const _sfc_main$q = /* @__PURE__ */ Object.assign({ name: "AppView" }, {
|
|
4199
4209
|
__name: "AppView",
|
|
4200
4210
|
setup(__props) {
|
|
@@ -4206,7 +4216,7 @@ const _sfc_main$q = /* @__PURE__ */ Object.assign({ name: "AppView" }, {
|
|
|
4206
4216
|
provide("reload", reload);
|
|
4207
4217
|
return (_ctx, _cache) => {
|
|
4208
4218
|
const _component_router_view = resolveComponent("router-view");
|
|
4209
|
-
return openBlock(), createElementBlock("section", _hoisted_1$
|
|
4219
|
+
return openBlock(), createElementBlock("section", _hoisted_1$b, [
|
|
4210
4220
|
unref(routerAlive) ? (openBlock(), createBlock(_component_router_view, { key: 0 }, {
|
|
4211
4221
|
default: withCtx(({ Component, route }) => [
|
|
4212
4222
|
(openBlock(), createBlock(resolveDynamicComponent(Component), {
|
|
@@ -7951,7 +7961,6 @@ const useUserStore = defineStore("layout-user", {
|
|
|
7951
7961
|
const useUserStoreWithOut = () => {
|
|
7952
7962
|
return useUserStore(store);
|
|
7953
7963
|
};
|
|
7954
|
-
const _hoisted_1$b = { class: "message" };
|
|
7955
7964
|
const _sfc_main$p = /* @__PURE__ */ Object.assign({ name: "Message" }, {
|
|
7956
7965
|
__name: "Message",
|
|
7957
7966
|
props: {
|
|
@@ -7960,11 +7969,16 @@ const _sfc_main$p = /* @__PURE__ */ Object.assign({ name: "Message" }, {
|
|
|
7960
7969
|
default: ""
|
|
7961
7970
|
}
|
|
7962
7971
|
},
|
|
7963
|
-
|
|
7972
|
+
emits: ["message-click"],
|
|
7973
|
+
setup(__props, { emit: __emit }) {
|
|
7974
|
+
const emit = __emit;
|
|
7964
7975
|
const userStore = useUserStoreWithOut();
|
|
7965
7976
|
const unreadCount = ref(0);
|
|
7966
7977
|
const getUnreadCount = async () => {
|
|
7967
7978
|
};
|
|
7979
|
+
const handleMessageClick = () => {
|
|
7980
|
+
emit("message-click");
|
|
7981
|
+
};
|
|
7968
7982
|
onMounted(() => {
|
|
7969
7983
|
getUnreadCount();
|
|
7970
7984
|
setInterval(
|
|
@@ -7980,7 +7994,10 @@ const _sfc_main$p = /* @__PURE__ */ Object.assign({ name: "Message" }, {
|
|
|
7980
7994
|
});
|
|
7981
7995
|
return (_ctx, _cache) => {
|
|
7982
7996
|
const _component_Icon = resolveComponent("Icon");
|
|
7983
|
-
return openBlock(), createElementBlock("div",
|
|
7997
|
+
return openBlock(), createElementBlock("div", {
|
|
7998
|
+
class: "message",
|
|
7999
|
+
onClick: handleMessageClick
|
|
8000
|
+
}, [
|
|
7984
8001
|
createVNode(unref(ElBadge), {
|
|
7985
8002
|
"is-dot": unref(unreadCount) > 0,
|
|
7986
8003
|
class: "message-badge"
|
|
@@ -7998,7 +8015,7 @@ const _sfc_main$p = /* @__PURE__ */ Object.assign({ name: "Message" }, {
|
|
|
7998
8015
|
};
|
|
7999
8016
|
}
|
|
8000
8017
|
});
|
|
8001
|
-
const Message = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-
|
|
8018
|
+
const Message = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-5a726c1e"]]);
|
|
8002
8019
|
const _sfc_main$o = /* @__PURE__ */ Object.assign({ name: "Collapse" }, {
|
|
8003
8020
|
__name: "Collapse",
|
|
8004
8021
|
props: {
|
|
@@ -8037,25 +8054,17 @@ const _hoisted_2$9 = { class: "pl-5px text-14px <lg:hidden" };
|
|
|
8037
8054
|
const _hoisted_3$8 = { class: "ml-15px" };
|
|
8038
8055
|
const _sfc_main$n = /* @__PURE__ */ Object.assign({ name: "UserInfo" }, {
|
|
8039
8056
|
__name: "UserInfo",
|
|
8040
|
-
|
|
8057
|
+
emits: ["logout-click"],
|
|
8058
|
+
setup(__props, { emit: __emit }) {
|
|
8059
|
+
const emit = __emit;
|
|
8041
8060
|
const { t: t2 } = useI18n("layout");
|
|
8042
|
-
const { replace } = useRouter();
|
|
8043
8061
|
const userStore = useUserStore();
|
|
8044
8062
|
const { getPrefixCls: getPrefixCls2 } = useDesign();
|
|
8045
8063
|
const prefixCls2 = getPrefixCls2("user-info");
|
|
8046
8064
|
const avatar = computed(() => userStore.user.avatar || avatarImg);
|
|
8047
8065
|
const userName = computed(() => userStore.user.nickname ?? "Admin");
|
|
8048
|
-
const
|
|
8049
|
-
|
|
8050
|
-
await ElMessageBox.confirm(t2("common.loginOutMessage"), t2("common.reminder"), {
|
|
8051
|
-
confirmButtonText: t2("common.ok"),
|
|
8052
|
-
cancelButtonText: t2("common.cancel"),
|
|
8053
|
-
type: "warning"
|
|
8054
|
-
});
|
|
8055
|
-
await userStore.loginOut();
|
|
8056
|
-
replace("/login?redirect=/");
|
|
8057
|
-
} catch {
|
|
8058
|
-
}
|
|
8066
|
+
const handleLogoutClick = () => {
|
|
8067
|
+
emit("logout-click");
|
|
8059
8068
|
};
|
|
8060
8069
|
return (_ctx, _cache) => {
|
|
8061
8070
|
const _component_Icon = resolveComponent("Icon");
|
|
@@ -8066,7 +8075,7 @@ const _sfc_main$n = /* @__PURE__ */ Object.assign({ name: "UserInfo" }, {
|
|
|
8066
8075
|
dropdown: withCtx(() => [
|
|
8067
8076
|
createVNode(unref(ElDropdownMenu), null, {
|
|
8068
8077
|
default: withCtx(() => [
|
|
8069
|
-
createVNode(unref(ElDropdownItem), { onClick:
|
|
8078
|
+
createVNode(unref(ElDropdownItem), { onClick: handleLogoutClick }, {
|
|
8070
8079
|
default: withCtx(() => [
|
|
8071
8080
|
createVNode(_component_Icon, { icon: "ep:switch-button" }),
|
|
8072
8081
|
createElementVNode("div", null, toDisplayString(unref(t2)("common.loginOut")), 1)
|
|
@@ -8103,7 +8112,7 @@ const _sfc_main$n = /* @__PURE__ */ Object.assign({ name: "UserInfo" }, {
|
|
|
8103
8112
|
};
|
|
8104
8113
|
}
|
|
8105
8114
|
});
|
|
8106
|
-
const UserInfo = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-
|
|
8115
|
+
const UserInfo = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-8d3c6bbf"]]);
|
|
8107
8116
|
const filterBreadcrumb = (routes, parentPath = "") => {
|
|
8108
8117
|
var _a2;
|
|
8109
8118
|
const res = [];
|
|
@@ -9177,6 +9186,16 @@ const {
|
|
|
9177
9186
|
const prefixCls$2 = getPrefixCls$2("tool-header");
|
|
9178
9187
|
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
9179
9188
|
name: "ToolHeader",
|
|
9189
|
+
props: {
|
|
9190
|
+
onMessageClick: {
|
|
9191
|
+
type: Function,
|
|
9192
|
+
default: null
|
|
9193
|
+
},
|
|
9194
|
+
onLogoutClick: {
|
|
9195
|
+
type: Function,
|
|
9196
|
+
default: null
|
|
9197
|
+
}
|
|
9198
|
+
},
|
|
9180
9199
|
setup(props, {
|
|
9181
9200
|
slots
|
|
9182
9201
|
}) {
|
|
@@ -9212,18 +9231,21 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
9212
9231
|
"color": "var(--top-header-text-color)"
|
|
9213
9232
|
}, null) : void 0, message.value ? createVNode(Message, {
|
|
9214
9233
|
"class": "custom-hover cursor-pointer",
|
|
9215
|
-
"color": "var(--top-header-text-color)"
|
|
9216
|
-
|
|
9234
|
+
"color": "var(--top-header-text-color)",
|
|
9235
|
+
"onMessageClick": props.onMessageClick
|
|
9236
|
+
}, null) : void 0, createVNode(UserInfo, {
|
|
9237
|
+
"onLogoutClick": props.onLogoutClick
|
|
9238
|
+
}, null)])]);
|
|
9217
9239
|
};
|
|
9218
9240
|
}
|
|
9219
9241
|
});
|
|
9220
|
-
const ToolHeader = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-
|
|
9242
|
+
const ToolHeader = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-73b69ef0"]]);
|
|
9221
9243
|
const {
|
|
9222
9244
|
getPrefixCls: getPrefixCls$1
|
|
9223
9245
|
} = useDesign();
|
|
9224
9246
|
const prefixCls$1 = getPrefixCls$1("layout");
|
|
9225
9247
|
const scrollRef = ref();
|
|
9226
|
-
const useRenderLayout = () => {
|
|
9248
|
+
const useRenderLayout = (onLogoClick, onMessageClick, onLogoutClick) => {
|
|
9227
9249
|
const appStore = useAppStore();
|
|
9228
9250
|
const permissionStore = usePermissionStore();
|
|
9229
9251
|
const pageLoading = computed(() => appStore.getPageLoading);
|
|
@@ -9261,9 +9283,12 @@ const useRenderLayout = () => {
|
|
|
9261
9283
|
"class": [{
|
|
9262
9284
|
"w-[var(--left-menu-min-width)]": appStore.getCollapse,
|
|
9263
9285
|
"w-[var(--left-menu-max-width)]": !appStore.getCollapse
|
|
9264
|
-
}]
|
|
9286
|
+
}],
|
|
9287
|
+
"onLogoClick": onLogoClick
|
|
9265
9288
|
}, null) : void 0, createVNode(ToolHeader, {
|
|
9266
|
-
"class": "flex-1"
|
|
9289
|
+
"class": "flex-1",
|
|
9290
|
+
"onMessageClick": onMessageClick,
|
|
9291
|
+
"onLogoutClick": onLogoutClick
|
|
9267
9292
|
}, null)]), createVNode("div", {
|
|
9268
9293
|
"class": "h-[calc(100%-var(--top-header-height))] w-full flex"
|
|
9269
9294
|
}, [createVNode(Menu, {
|
|
@@ -9285,10 +9310,14 @@ const useRenderLayout = () => {
|
|
|
9285
9310
|
return createVNode(Fragment, null, [createVNode("div", {
|
|
9286
9311
|
"class": ["relative flex items-center justify-between bg-[linear-gradient(var(--top-header-bg-color))]", "layout-border__bottom", festivalTopClass.value]
|
|
9287
9312
|
}, [logo.value ? createVNode(_sfc_main$r, {
|
|
9288
|
-
"class": ["w-[var(--left-menu-max-width)]"]
|
|
9313
|
+
"class": ["w-[var(--left-menu-max-width)]"],
|
|
9314
|
+
"onLogoClick": onLogoClick
|
|
9289
9315
|
}, null) : void 0, createVNode(Menu, {
|
|
9290
9316
|
"class": "h-[var(--top-tool-height)] flex-1 px-10px"
|
|
9291
|
-
}, null), createVNode(ToolHeader,
|
|
9317
|
+
}, null), createVNode(ToolHeader, {
|
|
9318
|
+
"onMessageClick": onMessageClick,
|
|
9319
|
+
"onLogoutClick": onLogoutClick
|
|
9320
|
+
}, null)]), createVNode("div", {
|
|
9292
9321
|
"class": [`${prefixCls$1}-content`, "w-full h-[calc(100%-var(--top-tool-height))]"]
|
|
9293
9322
|
}, [withDirectives(createVNode(ElScrollbar, {
|
|
9294
9323
|
"class": [`${prefixCls$1}-content-scrollbar`],
|
|
@@ -9304,9 +9333,12 @@ const useRenderLayout = () => {
|
|
|
9304
9333
|
"class": [{
|
|
9305
9334
|
"w-[var(--left-menu-min-width)]": appStore.getCollapse,
|
|
9306
9335
|
"w-[var(--left-menu-max-width)]": !appStore.getCollapse
|
|
9307
|
-
}]
|
|
9336
|
+
}],
|
|
9337
|
+
"onLogoClick": onLogoClick
|
|
9308
9338
|
}, null) : void 0, createVNode(ToolHeader, {
|
|
9309
|
-
"class": "flex-1"
|
|
9339
|
+
"class": "flex-1",
|
|
9340
|
+
"onMessageClick": onMessageClick,
|
|
9341
|
+
"onLogoutClick": onLogoutClick
|
|
9310
9342
|
}, {
|
|
9311
9343
|
default: () => createVNode(Menu, {
|
|
9312
9344
|
"mode": "horizontal",
|
|
@@ -9345,13 +9377,13 @@ const {
|
|
|
9345
9377
|
} = useDesign();
|
|
9346
9378
|
const prefixCls = getPrefixCls("layout");
|
|
9347
9379
|
const layoutScrollRef = ref();
|
|
9348
|
-
const renderLayout = (layout) => {
|
|
9380
|
+
const renderLayout = (layout, onLogoClick, onMessageClick, onLogoutClick) => {
|
|
9349
9381
|
const {
|
|
9350
9382
|
renderLeft,
|
|
9351
9383
|
renderTop,
|
|
9352
9384
|
renderTopLeft,
|
|
9353
9385
|
scrollRef: scrollRef2
|
|
9354
|
-
} = useRenderLayout();
|
|
9386
|
+
} = useRenderLayout(onLogoClick, onMessageClick, onLogoutClick);
|
|
9355
9387
|
layoutScrollRef.value = scrollRef2.value;
|
|
9356
9388
|
switch (unref(layout)) {
|
|
9357
9389
|
case "left":
|
|
@@ -9364,17 +9396,29 @@ const renderLayout = (layout) => {
|
|
|
9364
9396
|
};
|
|
9365
9397
|
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
9366
9398
|
name: "Layout",
|
|
9367
|
-
|
|
9399
|
+
emits: ["logo-click", "message-click", "logout-click"],
|
|
9400
|
+
setup(props, {
|
|
9401
|
+
emit
|
|
9402
|
+
}) {
|
|
9368
9403
|
const appStore = useAppStore();
|
|
9369
9404
|
provide("layoutScrollRef", layoutScrollRef);
|
|
9370
9405
|
const theme = computed(() => appStore.getTheme);
|
|
9371
9406
|
const layout = computed(() => appStore.getLayout);
|
|
9407
|
+
const handleLogoClick = () => {
|
|
9408
|
+
emit("logo-click");
|
|
9409
|
+
};
|
|
9410
|
+
const handleMessageClick = () => {
|
|
9411
|
+
emit("message-click");
|
|
9412
|
+
};
|
|
9413
|
+
const handleLogoutClick = () => {
|
|
9414
|
+
emit("logout-click");
|
|
9415
|
+
};
|
|
9372
9416
|
return () => createVNode("section", {
|
|
9373
9417
|
"class": [prefixCls, `${prefixCls}__${layout.value}`, "w-[100%] h-[100%] relative", `${prefixCls}__${theme.value}`]
|
|
9374
|
-
}, [renderLayout(layout), createVNode(_sfc_main$w, null, null)]);
|
|
9418
|
+
}, [renderLayout(layout, handleLogoClick, handleMessageClick, handleLogoutClick), createVNode(_sfc_main$w, null, null)]);
|
|
9375
9419
|
}
|
|
9376
9420
|
});
|
|
9377
|
-
const
|
|
9421
|
+
const Layout = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-1f128bba"]]);
|
|
9378
9422
|
const _sfc_main$d = {
|
|
9379
9423
|
__name: "ConfigGlobal",
|
|
9380
9424
|
props: {
|
|
@@ -11300,7 +11344,7 @@ function useLayout() {
|
|
|
11300
11344
|
};
|
|
11301
11345
|
}
|
|
11302
11346
|
const install = (app) => {
|
|
11303
|
-
app.component("BmpLayout",
|
|
11347
|
+
app.component("BmpLayout", Layout);
|
|
11304
11348
|
app.component("BmpConfigGlobal", _sfc_main$d);
|
|
11305
11349
|
app.component("BmpPageCard", PageCard);
|
|
11306
11350
|
app.component("BmpPageNavBar", PageNavBar);
|
|
@@ -11420,7 +11464,7 @@ const install = (app) => {
|
|
|
11420
11464
|
app.component("BmpSteps2", ElSteps);
|
|
11421
11465
|
app.component("BmpBacktop2", ElBacktop);
|
|
11422
11466
|
};
|
|
11423
|
-
|
|
11467
|
+
Layout.install = install;
|
|
11424
11468
|
export {
|
|
11425
11469
|
ElAffix2 as BmpAffix,
|
|
11426
11470
|
_sfc_main$7 as BmpAlert,
|
|
@@ -11481,7 +11525,7 @@ export {
|
|
|
11481
11525
|
ElInput2 as BmpInput,
|
|
11482
11526
|
ElInputNumber2 as BmpInputNumber,
|
|
11483
11527
|
ElInputTag2 as BmpInputTag,
|
|
11484
|
-
BmpLayout,
|
|
11528
|
+
Layout as BmpLayout,
|
|
11485
11529
|
ElLink2 as BmpLink,
|
|
11486
11530
|
ElLoading as BmpLoading,
|
|
11487
11531
|
ElMain2 as BmpMain,
|
|
@@ -11556,6 +11600,6 @@ export {
|
|
|
11556
11600
|
useUserStore as BmpUseUserStore,
|
|
11557
11601
|
useUserStoreWithOut as BmpUseUserStoreWithOut,
|
|
11558
11602
|
ElWatermark2 as BmpWatermark,
|
|
11559
|
-
|
|
11603
|
+
Layout as default,
|
|
11560
11604
|
install
|
|
11561
11605
|
};
|