bmp-layout 0.0.21 → 0.0.22
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 +1790 -1086
- package/bmp-layout.umd.js +4 -4
- package/{en-DJIGbjmW.mjs → en-BXmz6NO1.mjs} +4 -0
- package/locales/en.js +4 -0
- package/locales/zh-CN.js +4 -0
- package/package.json +1 -1
- package/style.css +1 -1
- package/svgs/menu-fold.svg +4 -0
- package/svgs/menu-trigger.svg +5 -0
- package/svgs/menu-unfold.svg +4 -0
- package/svgs/tag-close.svg +3 -0
- package/{zh-CN-85_i0WWX.mjs → zh-CN-CY7gEVUl.mjs} +4 -0
package/bmp-layout.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { openBlock, createBlock, unref, normalizeClass, nextTick, ref, computed, watch, withCtx, createElementBlock, createElementVNode, normalizeStyle, createVNode, Fragment, defineComponent, isVNode,
|
|
1
|
+
import { openBlock, createBlock, unref, normalizeClass, nextTick, ref, computed, watch, withCtx, createElementBlock, createElementVNode, normalizeStyle, createVNode, Fragment, resolveComponent, defineComponent, isVNode, renderList, createCommentVNode, createTextVNode, toDisplayString, renderSlot, onBeforeMount, withModifiers, Teleport, Transition, provide, KeepAlive, resolveDynamicComponent, onMounted, TransitionGroup, mergeProps, isRef, onUnmounted, withDirectives, resolveDirective, watchEffect, vShow, useSlots, useAttrs, createSlots, inject, onBeforeUnmount, reactive, onUpdated, render, useCssVars } from "vue";
|
|
2
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,
|
|
5
|
+
import { ElBacktop, ElIcon, ElMenuItem, ElSubMenu, ElScrollbar, ElMenu, ElDropdown, ElDropdownMenu, ElDropdownItem, ElInput, ElBadge, 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
|
+
import { useTemplateRefsList, useClipboard, useWindowSize } from "@vueuse/core";
|
|
8
9
|
import "vue-i18n";
|
|
9
|
-
import { useClipboard, useWindowSize } from "@vueuse/core";
|
|
10
10
|
let store = createPinia();
|
|
11
11
|
store.use(piniaPluginPersistedstate);
|
|
12
12
|
setActivePinia(store);
|
|
@@ -797,6 +797,8 @@ const useAppStore = defineStore("layout-app", {
|
|
|
797
797
|
// 偏好设置
|
|
798
798
|
message: true,
|
|
799
799
|
// 消息图标
|
|
800
|
+
tagsView: true,
|
|
801
|
+
// 标签页
|
|
800
802
|
logo: true,
|
|
801
803
|
// logo
|
|
802
804
|
footer: false,
|
|
@@ -837,6 +839,9 @@ const useAppStore = defineStore("layout-app", {
|
|
|
837
839
|
getMessage() {
|
|
838
840
|
return this.message;
|
|
839
841
|
},
|
|
842
|
+
getTagsView() {
|
|
843
|
+
return this.tagsView;
|
|
844
|
+
},
|
|
840
845
|
getLogo() {
|
|
841
846
|
return this.logo;
|
|
842
847
|
},
|
|
@@ -896,6 +901,9 @@ const useAppStore = defineStore("layout-app", {
|
|
|
896
901
|
setMessage(message) {
|
|
897
902
|
this.message = message;
|
|
898
903
|
},
|
|
904
|
+
setTagsView(tagsView) {
|
|
905
|
+
this.tagsView = tagsView;
|
|
906
|
+
},
|
|
899
907
|
setLogo(logo) {
|
|
900
908
|
this.logo = logo;
|
|
901
909
|
},
|
|
@@ -954,7 +962,7 @@ const useDesign = () => {
|
|
|
954
962
|
getPrefixCls: getPrefixCls2
|
|
955
963
|
};
|
|
956
964
|
};
|
|
957
|
-
const _sfc_main$
|
|
965
|
+
const _sfc_main$y = /* @__PURE__ */ Object.assign({ name: "BackTop" }, {
|
|
958
966
|
__name: "Backtop",
|
|
959
967
|
setup(__props) {
|
|
960
968
|
const { getPrefixCls: getPrefixCls2, variables: variables2 } = useDesign();
|
|
@@ -983,12 +991,6 @@ const isUrl = (path) => {
|
|
|
983
991
|
const reg = /(((^https?:(?:\/\/)?)(?:[-:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%#\/.\w-_]*)?\??(?:[-\+=&%@.\w_]*)#?(?:[\w]*))?)$/;
|
|
984
992
|
return reg.test(path);
|
|
985
993
|
};
|
|
986
|
-
const pathResolve = (parentPath, path) => {
|
|
987
|
-
if (isUrl(path))
|
|
988
|
-
return path;
|
|
989
|
-
const childPath = path.startsWith("/") || !path ? path : `/${path}`;
|
|
990
|
-
return `${parentPath}${childPath}`.replace(/\/\//g, "/");
|
|
991
|
-
};
|
|
992
994
|
const flatMultiLevelRoutes = (routes) => {
|
|
993
995
|
const modules = cloneDeep(routes);
|
|
994
996
|
for (let index = 0; index < modules.length; index++) {
|
|
@@ -1115,6 +1117,19 @@ const usePermissionStore = defineStore("layout-permission", {
|
|
|
1115
1117
|
return { ...child, path: `${parentPath}${childPath}` };
|
|
1116
1118
|
});
|
|
1117
1119
|
}
|
|
1120
|
+
},
|
|
1121
|
+
// 处理模块对应菜单(通过模块code)
|
|
1122
|
+
setModuleRoutersByCode(moduleCode) {
|
|
1123
|
+
const findRouter = this.getRoleRouters.find((router) => router.moduleCode === moduleCode);
|
|
1124
|
+
if (findRouter) {
|
|
1125
|
+
this.moduleId = findRouter.id;
|
|
1126
|
+
const children = findRouter.children || [];
|
|
1127
|
+
const parentPath = findRouter.path ? findRouter.path.startsWith("/") ? findRouter.path : `/${findRouter.path}` : "";
|
|
1128
|
+
this.moduleRouters = children.map((child) => {
|
|
1129
|
+
const childPath = child.path ? parentPath.endsWith("/") ? child.path.startsWith("/") ? child.path.substring(1) : child.path : child.path.startsWith("/") ? child.path : `/${child.path}` : "";
|
|
1130
|
+
return { ...child, path: `${parentPath}${childPath}` };
|
|
1131
|
+
});
|
|
1132
|
+
}
|
|
1118
1133
|
}
|
|
1119
1134
|
},
|
|
1120
1135
|
persist: false
|
|
@@ -3464,9 +3479,9 @@ try {
|
|
|
3464
3479
|
}
|
|
3465
3480
|
} catch (err) {
|
|
3466
3481
|
}
|
|
3467
|
-
const _hoisted_1$
|
|
3468
|
-
const _hoisted_2$
|
|
3469
|
-
const _sfc_main$
|
|
3482
|
+
const _hoisted_1$e = ["xlink:href"];
|
|
3483
|
+
const _hoisted_2$c = ["data-icon"];
|
|
3484
|
+
const _sfc_main$x = /* @__PURE__ */ Object.assign({ name: "Icon" }, {
|
|
3470
3485
|
__name: "Icon",
|
|
3471
3486
|
props: {
|
|
3472
3487
|
// icon name
|
|
@@ -3546,7 +3561,7 @@ const _sfc_main$v = /* @__PURE__ */ Object.assign({ name: "Icon" }, {
|
|
|
3546
3561
|
key: 0,
|
|
3547
3562
|
class: normalizeClass(unref(getSvgClass))
|
|
3548
3563
|
}, [
|
|
3549
|
-
createElementVNode("use", { "xlink:href": unref(symbolId) }, null, 8, _hoisted_1$
|
|
3564
|
+
createElementVNode("use", { "xlink:href": unref(symbolId) }, null, 8, _hoisted_1$e)
|
|
3550
3565
|
], 2)) : (openBlock(), createElementBlock("span", {
|
|
3551
3566
|
key: 1,
|
|
3552
3567
|
ref_key: "elRef",
|
|
@@ -3557,7 +3572,7 @@ const _sfc_main$v = /* @__PURE__ */ Object.assign({ name: "Icon" }, {
|
|
|
3557
3572
|
createElementVNode("span", {
|
|
3558
3573
|
class: normalizeClass(unref(getSvgClass)),
|
|
3559
3574
|
"data-icon": unref(symbolId)
|
|
3560
|
-
}, null, 10, _hoisted_2$
|
|
3575
|
+
}, null, 10, _hoisted_2$c)
|
|
3561
3576
|
], 6))
|
|
3562
3577
|
]),
|
|
3563
3578
|
_: 1
|
|
@@ -3632,7 +3647,7 @@ const useRenderMenuTitle = () => {
|
|
|
3632
3647
|
return mode == "vertical" && level == 0;
|
|
3633
3648
|
}
|
|
3634
3649
|
});
|
|
3635
|
-
return createVNode(Fragment, null, [isIcon.value && icon ? createVNode(_sfc_main$
|
|
3650
|
+
return createVNode(Fragment, null, [isIcon.value && icon ? createVNode(_sfc_main$x, {
|
|
3636
3651
|
"icon": meta.icon
|
|
3637
3652
|
}, null) : void 0, createVNode("span", {
|
|
3638
3653
|
"class": [`${prefixCls$5}__title`, "overflow-hidden overflow-ellipsis whitespace-nowrap text-ellipsis"]
|
|
@@ -3642,6 +3657,25 @@ const useRenderMenuTitle = () => {
|
|
|
3642
3657
|
renderMenuTitle: renderMenuTitle2
|
|
3643
3658
|
};
|
|
3644
3659
|
};
|
|
3660
|
+
const getRawRoute = (route) => {
|
|
3661
|
+
if (!route)
|
|
3662
|
+
return route;
|
|
3663
|
+
const { matched, ...opt } = route;
|
|
3664
|
+
return {
|
|
3665
|
+
...opt,
|
|
3666
|
+
matched: matched ? matched.map((item) => ({
|
|
3667
|
+
meta: item.meta,
|
|
3668
|
+
name: item.name,
|
|
3669
|
+
path: item.path
|
|
3670
|
+
})) : void 0
|
|
3671
|
+
};
|
|
3672
|
+
};
|
|
3673
|
+
const pathResolve = (parentPath, path) => {
|
|
3674
|
+
if (isUrl(path))
|
|
3675
|
+
return path;
|
|
3676
|
+
const childPath = path.startsWith("/") || !path ? path : `/${path}`;
|
|
3677
|
+
return `${parentPath}${childPath}`.replace(/\/\//g, "/");
|
|
3678
|
+
};
|
|
3645
3679
|
const {
|
|
3646
3680
|
renderMenuTitle
|
|
3647
3681
|
} = useRenderMenuTitle();
|
|
@@ -3691,6 +3725,39 @@ const useRenderMenuItem = () => {
|
|
|
3691
3725
|
renderMenuItem
|
|
3692
3726
|
};
|
|
3693
3727
|
};
|
|
3728
|
+
const _sfc_main$w = /* @__PURE__ */ Object.assign({ name: "Collapse" }, {
|
|
3729
|
+
__name: "Collapse",
|
|
3730
|
+
props: {
|
|
3731
|
+
color: {
|
|
3732
|
+
type: String,
|
|
3733
|
+
default: ""
|
|
3734
|
+
}
|
|
3735
|
+
},
|
|
3736
|
+
setup(__props) {
|
|
3737
|
+
const { getPrefixCls: getPrefixCls2 } = useDesign();
|
|
3738
|
+
const prefixCls2 = getPrefixCls2("collapse");
|
|
3739
|
+
const appStore = useAppStore();
|
|
3740
|
+
const collapse = computed(() => appStore.getCollapse);
|
|
3741
|
+
const toggleCollapse = () => {
|
|
3742
|
+
const collapsed = unref(collapse);
|
|
3743
|
+
appStore.setCollapse(!collapsed);
|
|
3744
|
+
};
|
|
3745
|
+
return (_ctx, _cache) => {
|
|
3746
|
+
const _component_Icon = resolveComponent("Icon");
|
|
3747
|
+
return openBlock(), createElementBlock("div", {
|
|
3748
|
+
class: normalizeClass(`${unref(prefixCls2)} ${unref(collapse) ? "!px-16px" : "!px-20px"}`),
|
|
3749
|
+
onClick: toggleCollapse
|
|
3750
|
+
}, [
|
|
3751
|
+
createVNode(_component_Icon, {
|
|
3752
|
+
color: __props.color,
|
|
3753
|
+
icon: unref(collapse) ? "svg-icon:menu-fold" : "svg-icon:menu-unfold",
|
|
3754
|
+
class: "cursor-pointer"
|
|
3755
|
+
}, null, 8, ["color", "icon"])
|
|
3756
|
+
], 2);
|
|
3757
|
+
};
|
|
3758
|
+
}
|
|
3759
|
+
});
|
|
3760
|
+
const Collapse = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-6fa09378"]]);
|
|
3694
3761
|
function _isSlot$2(s) {
|
|
3695
3762
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
3696
3763
|
}
|
|
@@ -3698,7 +3765,7 @@ const {
|
|
|
3698
3765
|
getPrefixCls: getPrefixCls$4
|
|
3699
3766
|
} = useDesign();
|
|
3700
3767
|
const prefixCls$4 = getPrefixCls$4("menu");
|
|
3701
|
-
const _sfc_main$
|
|
3768
|
+
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
3702
3769
|
// eslint-disable-next-line vue/no-reserved-component-names
|
|
3703
3770
|
name: "Menu",
|
|
3704
3771
|
props: {
|
|
@@ -3794,880 +3861,458 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
3794
3861
|
};
|
|
3795
3862
|
return () => createVNode("div", {
|
|
3796
3863
|
"id": prefixCls$4,
|
|
3797
|
-
"class": [`${prefixCls$4} ${prefixCls$4}__${unref(menuMode)}`, "h-[100%]
|
|
3864
|
+
"class": [`${prefixCls$4} ${prefixCls$4}__${unref(menuMode)}`, "h-[100%] flex flex-col", {
|
|
3798
3865
|
"w-[var(--left-menu-min-width)]": unref(collapse),
|
|
3799
3866
|
"w-[var(--left-menu-max-width)]": !unref(collapse),
|
|
3800
3867
|
"bg-[linear-gradient(var(--left-menu-bg-color))]": unref(layout) == "left" || unref(layout) == "topLeft" && props.mode == "vertical"
|
|
3801
3868
|
}]
|
|
3802
|
-
}, [
|
|
3869
|
+
}, [createVNode("div", {
|
|
3870
|
+
"class": "flex-1 overflow-hidden"
|
|
3871
|
+
}, [renderMenuWrap()]), layout.value !== "top" ? createVNode(Collapse, {
|
|
3872
|
+
"color": "var(--top-header-text-color)"
|
|
3873
|
+
}, null) : void 0]);
|
|
3803
3874
|
}
|
|
3804
3875
|
});
|
|
3805
|
-
const Menu = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
return
|
|
3825
|
-
return openBlock(), createElementBlock("div", {
|
|
3826
|
-
class: normalizeClass([unref(prefixCls2), "flex items-center justify-center cursor-pointer", { "is-active": props.active }]),
|
|
3827
|
-
onClick: handleClick
|
|
3828
|
-
}, [
|
|
3829
|
-
createElementVNode("div", {
|
|
3830
|
-
class: normalizeClass(`${unref(prefixCls2)}__hamburger-icon`)
|
|
3831
|
-
}, _cache[0] || (_cache[0] = [
|
|
3832
|
-
createElementVNode("span", { class: "line" }, null, -1),
|
|
3833
|
-
createElementVNode("span", { class: "line" }, null, -1),
|
|
3834
|
-
createElementVNode("span", { class: "line" }, null, -1)
|
|
3835
|
-
]), 2)
|
|
3836
|
-
], 2);
|
|
3837
|
-
};
|
|
3876
|
+
const Menu = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-2f747427"]]);
|
|
3877
|
+
var BI_RM = "0123456789abcdefghijklmnopqrstuvwxyz";
|
|
3878
|
+
function int2char(n2) {
|
|
3879
|
+
return BI_RM.charAt(n2);
|
|
3880
|
+
}
|
|
3881
|
+
function op_and(x, y) {
|
|
3882
|
+
return x & y;
|
|
3883
|
+
}
|
|
3884
|
+
function op_or(x, y) {
|
|
3885
|
+
return x | y;
|
|
3886
|
+
}
|
|
3887
|
+
function op_xor(x, y) {
|
|
3888
|
+
return x ^ y;
|
|
3889
|
+
}
|
|
3890
|
+
function op_andnot(x, y) {
|
|
3891
|
+
return x & ~y;
|
|
3892
|
+
}
|
|
3893
|
+
function lbit(x) {
|
|
3894
|
+
if (x == 0) {
|
|
3895
|
+
return -1;
|
|
3838
3896
|
}
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3897
|
+
var r2 = 0;
|
|
3898
|
+
if ((x & 65535) == 0) {
|
|
3899
|
+
x >>= 16;
|
|
3900
|
+
r2 += 16;
|
|
3901
|
+
}
|
|
3902
|
+
if ((x & 255) == 0) {
|
|
3903
|
+
x >>= 8;
|
|
3904
|
+
r2 += 8;
|
|
3905
|
+
}
|
|
3906
|
+
if ((x & 15) == 0) {
|
|
3907
|
+
x >>= 4;
|
|
3908
|
+
r2 += 4;
|
|
3909
|
+
}
|
|
3910
|
+
if ((x & 3) == 0) {
|
|
3911
|
+
x >>= 2;
|
|
3912
|
+
r2 += 2;
|
|
3913
|
+
}
|
|
3914
|
+
if ((x & 1) == 0) {
|
|
3915
|
+
++r2;
|
|
3916
|
+
}
|
|
3917
|
+
return r2;
|
|
3918
|
+
}
|
|
3919
|
+
function cbit(x) {
|
|
3920
|
+
var r2 = 0;
|
|
3921
|
+
while (x != 0) {
|
|
3922
|
+
x &= x - 1;
|
|
3923
|
+
++r2;
|
|
3924
|
+
}
|
|
3925
|
+
return r2;
|
|
3926
|
+
}
|
|
3927
|
+
var b64map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
3928
|
+
var b64pad = "=";
|
|
3929
|
+
function hex2b64(h) {
|
|
3930
|
+
var i;
|
|
3931
|
+
var c;
|
|
3932
|
+
var ret = "";
|
|
3933
|
+
for (i = 0; i + 3 <= h.length; i += 3) {
|
|
3934
|
+
c = parseInt(h.substring(i, i + 3), 16);
|
|
3935
|
+
ret += b64map.charAt(c >> 6) + b64map.charAt(c & 63);
|
|
3936
|
+
}
|
|
3937
|
+
if (i + 1 == h.length) {
|
|
3938
|
+
c = parseInt(h.substring(i, i + 1), 16);
|
|
3939
|
+
ret += b64map.charAt(c << 2);
|
|
3940
|
+
} else if (i + 2 == h.length) {
|
|
3941
|
+
c = parseInt(h.substring(i, i + 2), 16);
|
|
3942
|
+
ret += b64map.charAt(c >> 2) + b64map.charAt((c & 3) << 4);
|
|
3943
|
+
}
|
|
3944
|
+
while ((ret.length & 3) > 0) {
|
|
3945
|
+
ret += b64pad;
|
|
3946
|
+
}
|
|
3947
|
+
return ret;
|
|
3948
|
+
}
|
|
3949
|
+
var decoder$1;
|
|
3950
|
+
var Hex = {
|
|
3951
|
+
decode: function(a) {
|
|
3952
|
+
var i;
|
|
3953
|
+
if (decoder$1 === void 0) {
|
|
3954
|
+
var hex = "0123456789ABCDEF";
|
|
3955
|
+
var ignore = " \f\n\r \u2028\u2029";
|
|
3956
|
+
decoder$1 = {};
|
|
3957
|
+
for (i = 0; i < 16; ++i) {
|
|
3958
|
+
decoder$1[hex.charAt(i)] = i;
|
|
3959
|
+
}
|
|
3960
|
+
hex = hex.toLowerCase();
|
|
3961
|
+
for (i = 10; i < 16; ++i) {
|
|
3962
|
+
decoder$1[hex.charAt(i)] = i;
|
|
3963
|
+
}
|
|
3964
|
+
for (i = 0; i < ignore.length; ++i) {
|
|
3965
|
+
decoder$1[ignore.charAt(i)] = -1;
|
|
3966
|
+
}
|
|
3851
3967
|
}
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
const emit = __emit;
|
|
3860
|
-
const router = useRouter();
|
|
3861
|
-
const permissionStore = usePermissionStore();
|
|
3862
|
-
const searchKeyword = ref("");
|
|
3863
|
-
const activeCategory = ref(0);
|
|
3864
|
-
const routers = computed(() => permissionStore.getRoleRouters);
|
|
3865
|
-
const filteredMenus = computed(() => {
|
|
3866
|
-
const keyword = searchKeyword.value.toLowerCase().trim();
|
|
3867
|
-
const filterHiddenMenus = (items) => {
|
|
3868
|
-
if (!items || !Array.isArray(items))
|
|
3869
|
-
return [];
|
|
3870
|
-
return items.filter((item) => !!item.visible).map((item) => ({
|
|
3871
|
-
...item,
|
|
3872
|
-
children: item.children ? filterHiddenMenus(item.children) : []
|
|
3873
|
-
}));
|
|
3874
|
-
};
|
|
3875
|
-
const baseMenus = filterHiddenMenus(routers.value);
|
|
3876
|
-
if (!keyword) {
|
|
3877
|
-
return baseMenus;
|
|
3968
|
+
var out = [];
|
|
3969
|
+
var bits = 0;
|
|
3970
|
+
var char_count = 0;
|
|
3971
|
+
for (i = 0; i < a.length; ++i) {
|
|
3972
|
+
var c = a.charAt(i);
|
|
3973
|
+
if (c == "=") {
|
|
3974
|
+
break;
|
|
3878
3975
|
}
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
}
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
}
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
}
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3976
|
+
c = decoder$1[c];
|
|
3977
|
+
if (c == -1) {
|
|
3978
|
+
continue;
|
|
3979
|
+
}
|
|
3980
|
+
if (c === void 0) {
|
|
3981
|
+
throw new Error("Illegal character at offset " + i);
|
|
3982
|
+
}
|
|
3983
|
+
bits |= c;
|
|
3984
|
+
if (++char_count >= 2) {
|
|
3985
|
+
out[out.length] = bits;
|
|
3986
|
+
bits = 0;
|
|
3987
|
+
char_count = 0;
|
|
3988
|
+
} else {
|
|
3989
|
+
bits <<= 4;
|
|
3990
|
+
}
|
|
3991
|
+
}
|
|
3992
|
+
if (char_count) {
|
|
3993
|
+
throw new Error("Hex encoding incomplete: 4 bits missing");
|
|
3994
|
+
}
|
|
3995
|
+
return out;
|
|
3996
|
+
}
|
|
3997
|
+
};
|
|
3998
|
+
var decoder;
|
|
3999
|
+
var Base64 = {
|
|
4000
|
+
decode: function(a) {
|
|
4001
|
+
var i;
|
|
4002
|
+
if (decoder === void 0) {
|
|
4003
|
+
var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
4004
|
+
var ignore = "= \f\n\r \u2028\u2029";
|
|
4005
|
+
decoder = /* @__PURE__ */ Object.create(null);
|
|
4006
|
+
for (i = 0; i < 64; ++i) {
|
|
4007
|
+
decoder[b64.charAt(i)] = i;
|
|
4008
|
+
}
|
|
4009
|
+
decoder["-"] = 62;
|
|
4010
|
+
decoder["_"] = 63;
|
|
4011
|
+
for (i = 0; i < ignore.length; ++i) {
|
|
4012
|
+
decoder[ignore.charAt(i)] = -1;
|
|
4013
|
+
}
|
|
4014
|
+
}
|
|
4015
|
+
var out = [];
|
|
4016
|
+
var bits = 0;
|
|
4017
|
+
var char_count = 0;
|
|
4018
|
+
for (i = 0; i < a.length; ++i) {
|
|
4019
|
+
var c = a.charAt(i);
|
|
4020
|
+
if (c == "=") {
|
|
4021
|
+
break;
|
|
4022
|
+
}
|
|
4023
|
+
c = decoder[c];
|
|
4024
|
+
if (c == -1) {
|
|
4025
|
+
continue;
|
|
4026
|
+
}
|
|
4027
|
+
if (c === void 0) {
|
|
4028
|
+
throw new Error("Illegal character at offset " + i);
|
|
4029
|
+
}
|
|
4030
|
+
bits |= c;
|
|
4031
|
+
if (++char_count >= 4) {
|
|
4032
|
+
out[out.length] = bits >> 16;
|
|
4033
|
+
out[out.length] = bits >> 8 & 255;
|
|
4034
|
+
out[out.length] = bits & 255;
|
|
4035
|
+
bits = 0;
|
|
4036
|
+
char_count = 0;
|
|
4037
|
+
} else {
|
|
4038
|
+
bits <<= 6;
|
|
4039
|
+
}
|
|
4040
|
+
}
|
|
4041
|
+
switch (char_count) {
|
|
4042
|
+
case 1:
|
|
4043
|
+
throw new Error("Base64 encoding incomplete: at least 2 bits missing");
|
|
4044
|
+
case 2:
|
|
4045
|
+
out[out.length] = bits >> 10;
|
|
4046
|
+
break;
|
|
4047
|
+
case 3:
|
|
4048
|
+
out[out.length] = bits >> 16;
|
|
4049
|
+
out[out.length] = bits >> 8 & 255;
|
|
4050
|
+
break;
|
|
4051
|
+
}
|
|
4052
|
+
return out;
|
|
4053
|
+
},
|
|
4054
|
+
re: /-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,
|
|
4055
|
+
unarmor: function(a) {
|
|
4056
|
+
var m = Base64.re.exec(a);
|
|
4057
|
+
if (m) {
|
|
4058
|
+
if (m[1]) {
|
|
4059
|
+
a = m[1];
|
|
4060
|
+
} else if (m[2]) {
|
|
4061
|
+
a = m[2];
|
|
4062
|
+
} else {
|
|
4063
|
+
throw new Error("RegExp out of sync");
|
|
4064
|
+
}
|
|
4065
|
+
}
|
|
4066
|
+
return Base64.decode(a);
|
|
4067
|
+
}
|
|
4068
|
+
};
|
|
4069
|
+
var max = 1e13;
|
|
4070
|
+
var Int10 = (
|
|
4071
|
+
/** @class */
|
|
4072
|
+
function() {
|
|
4073
|
+
function Int102(value) {
|
|
4074
|
+
this.buf = [+value || 0];
|
|
4075
|
+
}
|
|
4076
|
+
Int102.prototype.mulAdd = function(m, c) {
|
|
4077
|
+
var b = this.buf;
|
|
4078
|
+
var l2 = b.length;
|
|
4079
|
+
var i;
|
|
4080
|
+
var t2;
|
|
4081
|
+
for (i = 0; i < l2; ++i) {
|
|
4082
|
+
t2 = b[i] * m + c;
|
|
4083
|
+
if (t2 < max) {
|
|
4084
|
+
c = 0;
|
|
4085
|
+
} else {
|
|
4086
|
+
c = 0 | t2 / max;
|
|
4087
|
+
t2 -= c * max;
|
|
3936
4088
|
}
|
|
4089
|
+
b[i] = t2;
|
|
4090
|
+
}
|
|
4091
|
+
if (c > 0) {
|
|
4092
|
+
b[i] = c;
|
|
3937
4093
|
}
|
|
3938
|
-
return fullPath;
|
|
3939
|
-
};
|
|
3940
|
-
const closePanel = () => {
|
|
3941
|
-
emit("update:visible", false);
|
|
3942
|
-
searchKeyword.value = "";
|
|
3943
|
-
activeCategory.value = 0;
|
|
3944
4094
|
};
|
|
3945
|
-
|
|
3946
|
-
var
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
4095
|
+
Int102.prototype.sub = function(c) {
|
|
4096
|
+
var b = this.buf;
|
|
4097
|
+
var l2 = b.length;
|
|
4098
|
+
var i;
|
|
4099
|
+
var t2;
|
|
4100
|
+
for (i = 0; i < l2; ++i) {
|
|
4101
|
+
t2 = b[i] - c;
|
|
4102
|
+
if (t2 < 0) {
|
|
4103
|
+
t2 += max;
|
|
4104
|
+
c = 1;
|
|
3953
4105
|
} else {
|
|
3954
|
-
|
|
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
|
-
window.location.href = targetUrl;
|
|
4106
|
+
c = 0;
|
|
3959
4107
|
}
|
|
3960
|
-
|
|
4108
|
+
b[i] = t2;
|
|
4109
|
+
}
|
|
4110
|
+
while (b[b.length - 1] === 0) {
|
|
4111
|
+
b.pop();
|
|
3961
4112
|
}
|
|
3962
4113
|
};
|
|
3963
|
-
|
|
3964
|
-
|
|
4114
|
+
Int102.prototype.toString = function(base) {
|
|
4115
|
+
if ((base || 10) != 10) {
|
|
4116
|
+
throw new Error("only base 10 is supported");
|
|
4117
|
+
}
|
|
4118
|
+
var b = this.buf;
|
|
4119
|
+
var s = b[b.length - 1].toString();
|
|
4120
|
+
for (var i = b.length - 2; i >= 0; --i) {
|
|
4121
|
+
s += (max + b[i]).toString().substring(1);
|
|
4122
|
+
}
|
|
4123
|
+
return s;
|
|
3965
4124
|
};
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
4125
|
+
Int102.prototype.valueOf = function() {
|
|
4126
|
+
var b = this.buf;
|
|
4127
|
+
var v = 0;
|
|
4128
|
+
for (var i = b.length - 1; i >= 0; --i) {
|
|
4129
|
+
v = v * max + b[i];
|
|
3970
4130
|
}
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
__props.visible ? (openBlock(), createElementBlock("div", {
|
|
3977
|
-
key: 0,
|
|
3978
|
-
class: normalizeClass([unref(prefixCls2) + "__overlay"]),
|
|
3979
|
-
onClick: closePanel
|
|
3980
|
-
}, [
|
|
3981
|
-
createVNode(Transition, { name: "slide-down" }, {
|
|
3982
|
-
default: withCtx(() => [
|
|
3983
|
-
__props.visible ? (openBlock(), createElementBlock("div", {
|
|
3984
|
-
key: 0,
|
|
3985
|
-
class: normalizeClass([unref(prefixCls2)]),
|
|
3986
|
-
onClick: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
3987
|
-
}, ["stop"]))
|
|
3988
|
-
}, [
|
|
3989
|
-
createElementVNode("div", {
|
|
3990
|
-
class: normalizeClass([unref(prefixCls2) + "__body"])
|
|
3991
|
-
}, [
|
|
3992
|
-
createElementVNode("div", {
|
|
3993
|
-
class: normalizeClass([unref(prefixCls2) + "__sidebar"])
|
|
3994
|
-
}, [
|
|
3995
|
-
createElementVNode("div", {
|
|
3996
|
-
class: normalizeClass([unref(prefixCls2) + "__sidebar-title"])
|
|
3997
|
-
}, [
|
|
3998
|
-
createElementVNode("span", null, toDisplayString(unref(t2)("common.allProducts")), 1)
|
|
3999
|
-
], 2),
|
|
4000
|
-
createVNode(unref(ElScrollbar), null, {
|
|
4001
|
-
default: withCtx(() => [
|
|
4002
|
-
createElementVNode("div", _hoisted_1$c, [
|
|
4003
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(groupedMenus.value, (group, index) => {
|
|
4004
|
-
return openBlock(), createElementBlock("div", {
|
|
4005
|
-
key: index,
|
|
4006
|
-
class: normalizeClass([
|
|
4007
|
-
unref(prefixCls2) + "__category",
|
|
4008
|
-
{ "is-active": activeCategory.value === index }
|
|
4009
|
-
]),
|
|
4010
|
-
onClick: ($event) => handleCategorySelect(index)
|
|
4011
|
-
}, [
|
|
4012
|
-
createElementVNode("span", null, toDisplayString(group.title), 1)
|
|
4013
|
-
], 10, _hoisted_2$a);
|
|
4014
|
-
}), 128))
|
|
4015
|
-
])
|
|
4016
|
-
]),
|
|
4017
|
-
_: 1
|
|
4018
|
-
})
|
|
4019
|
-
], 2),
|
|
4020
|
-
createElementVNode("div", {
|
|
4021
|
-
class: normalizeClass([unref(prefixCls2) + "__content"])
|
|
4022
|
-
}, [
|
|
4023
|
-
createElementVNode("div", {
|
|
4024
|
-
class: normalizeClass([unref(prefixCls2) + "__header"])
|
|
4025
|
-
}, [
|
|
4026
|
-
createVNode(unref(ElInput), {
|
|
4027
|
-
modelValue: searchKeyword.value,
|
|
4028
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchKeyword.value = $event),
|
|
4029
|
-
placeholder: unref(t2)("common.searchMenu"),
|
|
4030
|
-
clearable: "",
|
|
4031
|
-
size: "default"
|
|
4032
|
-
}, {
|
|
4033
|
-
prefix: withCtx(() => [
|
|
4034
|
-
createVNode(unref(_sfc_main$v), {
|
|
4035
|
-
icon: "ep:search",
|
|
4036
|
-
size: 16
|
|
4037
|
-
})
|
|
4038
|
-
]),
|
|
4039
|
-
_: 1
|
|
4040
|
-
}, 8, ["modelValue", "placeholder"]),
|
|
4041
|
-
createElementVNode("div", {
|
|
4042
|
-
class: normalizeClass([unref(prefixCls2) + "__close"]),
|
|
4043
|
-
onClick: closePanel
|
|
4044
|
-
}, [
|
|
4045
|
-
createVNode(unref(_sfc_main$v), {
|
|
4046
|
-
icon: "ep:close",
|
|
4047
|
-
size: 18
|
|
4048
|
-
})
|
|
4049
|
-
], 2)
|
|
4050
|
-
], 2),
|
|
4051
|
-
createVNode(unref(ElScrollbar), null, {
|
|
4052
|
-
default: withCtx(() => [
|
|
4053
|
-
createElementVNode("div", {
|
|
4054
|
-
class: normalizeClass([unref(prefixCls2) + "__grid-container"])
|
|
4055
|
-
}, [
|
|
4056
|
-
currentCategoryMenus.value.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(currentCategoryMenus.value, (secondMenu, index) => {
|
|
4057
|
-
var _a2, _b;
|
|
4058
|
-
return openBlock(), createElementBlock("div", {
|
|
4059
|
-
key: index,
|
|
4060
|
-
class: normalizeClass([unref(prefixCls2) + "__column"])
|
|
4061
|
-
}, [
|
|
4062
|
-
createElementVNode("div", {
|
|
4063
|
-
class: normalizeClass([unref(prefixCls2) + "__column-title"])
|
|
4064
|
-
}, [
|
|
4065
|
-
createElementVNode("span", null, toDisplayString(((_a2 = secondMenu.meta) == null ? void 0 : _a2.title) || secondMenu.name), 1)
|
|
4066
|
-
], 2),
|
|
4067
|
-
createElementVNode("div", {
|
|
4068
|
-
class: normalizeClass([unref(prefixCls2) + "__column-list"])
|
|
4069
|
-
}, [
|
|
4070
|
-
secondMenu.children && secondMenu.children.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(secondMenu.children.filter((c) => {
|
|
4071
|
-
var _a3;
|
|
4072
|
-
return !((_a3 = c.meta) == null ? void 0 : _a3.hidden);
|
|
4073
|
-
}), (thirdMenu) => {
|
|
4074
|
-
var _a3;
|
|
4075
|
-
return openBlock(), createElementBlock("div", {
|
|
4076
|
-
key: thirdMenu.path,
|
|
4077
|
-
class: normalizeClass([unref(prefixCls2) + "__column-item"]),
|
|
4078
|
-
onClick: ($event) => {
|
|
4079
|
-
var _a4;
|
|
4080
|
-
return handleSelect(thirdMenu, joinPath((_a4 = groupedMenus.value[activeCategory.value]) == null ? void 0 : _a4.path, secondMenu.path));
|
|
4081
|
-
}
|
|
4082
|
-
}, [
|
|
4083
|
-
createElementVNode("span", null, toDisplayString(((_a3 = thirdMenu.meta) == null ? void 0 : _a3.title) || thirdMenu.name), 1)
|
|
4084
|
-
], 10, _hoisted_3$9);
|
|
4085
|
-
}), 128)) : (openBlock(), createElementBlock("div", {
|
|
4086
|
-
key: 1,
|
|
4087
|
-
class: normalizeClass([
|
|
4088
|
-
unref(prefixCls2) + "__column-item",
|
|
4089
|
-
{ [unref(prefixCls2) + "__column-item--disabled"]: secondMenu.type === 1 }
|
|
4090
|
-
]),
|
|
4091
|
-
onClick: ($event) => {
|
|
4092
|
-
var _a3;
|
|
4093
|
-
return secondMenu.type === 2 && handleSelect(secondMenu, (_a3 = groupedMenus.value[activeCategory.value]) == null ? void 0 : _a3.path);
|
|
4094
|
-
}
|
|
4095
|
-
}, [
|
|
4096
|
-
createElementVNode("span", null, toDisplayString(secondMenu.type === 1 ? unref(t2)("common.noData") || "暂无" : ((_b = secondMenu.meta) == null ? void 0 : _b.title) || secondMenu.name), 1)
|
|
4097
|
-
], 10, _hoisted_4$7))
|
|
4098
|
-
], 2)
|
|
4099
|
-
], 2);
|
|
4100
|
-
}), 128)) : groupedMenus.value[activeCategory.value] ? (openBlock(), createElementBlock("div", {
|
|
4101
|
-
key: 1,
|
|
4102
|
-
class: normalizeClass([unref(prefixCls2) + "__column"])
|
|
4103
|
-
}, [
|
|
4104
|
-
createElementVNode("div", {
|
|
4105
|
-
class: normalizeClass([unref(prefixCls2) + "__column-list"])
|
|
4106
|
-
}, [
|
|
4107
|
-
createElementVNode("div", {
|
|
4108
|
-
class: normalizeClass([unref(prefixCls2) + "__column-item", unref(prefixCls2) + "__column-item--disabled"])
|
|
4109
|
-
}, [
|
|
4110
|
-
createElementVNode("span", null, toDisplayString(unref(t2)("common.noData") || "暂无"), 1)
|
|
4111
|
-
], 2)
|
|
4112
|
-
], 2)
|
|
4113
|
-
], 2)) : (openBlock(), createElementBlock("div", {
|
|
4114
|
-
key: 2,
|
|
4115
|
-
class: normalizeClass([unref(prefixCls2) + "__empty"])
|
|
4116
|
-
}, [
|
|
4117
|
-
createVNode(unref(_sfc_main$v), {
|
|
4118
|
-
icon: "ant-design:inbox-outlined",
|
|
4119
|
-
size: 48
|
|
4120
|
-
}),
|
|
4121
|
-
createElementVNode("span", null, toDisplayString(unref(t2)("common.noDataTitle")), 1)
|
|
4122
|
-
], 2))
|
|
4123
|
-
], 2)
|
|
4124
|
-
]),
|
|
4125
|
-
_: 1
|
|
4126
|
-
})
|
|
4127
|
-
], 2)
|
|
4128
|
-
], 2)
|
|
4129
|
-
], 2)) : createCommentVNode("", true)
|
|
4130
|
-
]),
|
|
4131
|
-
_: 1
|
|
4132
|
-
})
|
|
4133
|
-
], 2)) : createCommentVNode("", true)
|
|
4134
|
-
]),
|
|
4135
|
-
_: 1
|
|
4136
|
-
})
|
|
4137
|
-
]);
|
|
4131
|
+
return v;
|
|
4132
|
+
};
|
|
4133
|
+
Int102.prototype.simplify = function() {
|
|
4134
|
+
var b = this.buf;
|
|
4135
|
+
return b.length == 1 ? b[0] : this;
|
|
4138
4136
|
};
|
|
4137
|
+
return Int102;
|
|
4138
|
+
}()
|
|
4139
|
+
);
|
|
4140
|
+
var ellipsis = "…";
|
|
4141
|
+
var reTimeS = /^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;
|
|
4142
|
+
var reTimeL = /^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;
|
|
4143
|
+
function stringCut(str, len) {
|
|
4144
|
+
if (str.length > len) {
|
|
4145
|
+
str = str.substring(0, len) + ellipsis;
|
|
4139
4146
|
}
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4147
|
+
return str;
|
|
4148
|
+
}
|
|
4149
|
+
var Stream = (
|
|
4150
|
+
/** @class */
|
|
4151
|
+
function() {
|
|
4152
|
+
function Stream2(enc, pos) {
|
|
4153
|
+
this.hexDigits = "0123456789ABCDEF";
|
|
4154
|
+
if (enc instanceof Stream2) {
|
|
4155
|
+
this.enc = enc.enc;
|
|
4156
|
+
this.pos = enc.pos;
|
|
4157
|
+
} else {
|
|
4158
|
+
this.enc = enc;
|
|
4159
|
+
this.pos = pos;
|
|
4160
|
+
}
|
|
4161
|
+
}
|
|
4162
|
+
Stream2.prototype.get = function(pos) {
|
|
4163
|
+
if (pos === void 0) {
|
|
4164
|
+
pos = this.pos++;
|
|
4165
|
+
}
|
|
4166
|
+
if (pos >= this.enc.length) {
|
|
4167
|
+
throw new Error("Requesting byte offset ".concat(pos, " on a stream of length ").concat(this.enc.length));
|
|
4168
|
+
}
|
|
4169
|
+
return "string" === typeof this.enc ? this.enc.charCodeAt(pos) : this.enc[pos];
|
|
4156
4170
|
};
|
|
4157
|
-
|
|
4158
|
-
return
|
|
4159
|
-
});
|
|
4160
|
-
const handleClickLogo = () => {
|
|
4161
|
-
emit("logo-click");
|
|
4171
|
+
Stream2.prototype.hexByte = function(b) {
|
|
4172
|
+
return this.hexDigits.charAt(b >> 4 & 15) + this.hexDigits.charAt(b & 15);
|
|
4162
4173
|
};
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
}
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
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
|
-
])
|
|
4198
|
-
], 2),
|
|
4199
|
-
createVNode(unref(ProductServicePanel), {
|
|
4200
|
-
visible: panelVisible.value,
|
|
4201
|
-
"onUpdate:visible": _cache[0] || (_cache[0] = ($event) => panelVisible.value = $event)
|
|
4202
|
-
}, null, 8, ["visible"])
|
|
4203
|
-
]);
|
|
4174
|
+
Stream2.prototype.hexDump = function(start, end, raw) {
|
|
4175
|
+
var s = "";
|
|
4176
|
+
for (var i = start; i < end; ++i) {
|
|
4177
|
+
s += this.hexByte(this.get(i));
|
|
4178
|
+
if (raw !== true) {
|
|
4179
|
+
switch (i & 15) {
|
|
4180
|
+
case 7:
|
|
4181
|
+
s += " ";
|
|
4182
|
+
break;
|
|
4183
|
+
case 15:
|
|
4184
|
+
s += "\n";
|
|
4185
|
+
break;
|
|
4186
|
+
default:
|
|
4187
|
+
s += " ";
|
|
4188
|
+
}
|
|
4189
|
+
}
|
|
4190
|
+
}
|
|
4191
|
+
return s;
|
|
4204
4192
|
};
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
routerAlive.value = false;
|
|
4214
|
-
nextTick(() => routerAlive.value = true);
|
|
4193
|
+
Stream2.prototype.isASCII = function(start, end) {
|
|
4194
|
+
for (var i = start; i < end; ++i) {
|
|
4195
|
+
var c = this.get(i);
|
|
4196
|
+
if (c < 32 || c > 176) {
|
|
4197
|
+
return false;
|
|
4198
|
+
}
|
|
4199
|
+
}
|
|
4200
|
+
return true;
|
|
4215
4201
|
};
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
(openBlock(), createBlock(resolveDynamicComponent(Component), {
|
|
4223
|
-
key: route.fullPath
|
|
4224
|
-
}))
|
|
4225
|
-
]),
|
|
4226
|
-
_: 1
|
|
4227
|
-
})) : createCommentVNode("", true)
|
|
4228
|
-
]);
|
|
4202
|
+
Stream2.prototype.parseStringISO = function(start, end) {
|
|
4203
|
+
var s = "";
|
|
4204
|
+
for (var i = start; i < end; ++i) {
|
|
4205
|
+
s += String.fromCharCode(this.get(i));
|
|
4206
|
+
}
|
|
4207
|
+
return s;
|
|
4229
4208
|
};
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
var
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
}
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
}
|
|
4242
|
-
function op_xor(x, y) {
|
|
4243
|
-
return x ^ y;
|
|
4244
|
-
}
|
|
4245
|
-
function op_andnot(x, y) {
|
|
4246
|
-
return x & ~y;
|
|
4247
|
-
}
|
|
4248
|
-
function lbit(x) {
|
|
4249
|
-
if (x == 0) {
|
|
4250
|
-
return -1;
|
|
4251
|
-
}
|
|
4252
|
-
var r2 = 0;
|
|
4253
|
-
if ((x & 65535) == 0) {
|
|
4254
|
-
x >>= 16;
|
|
4255
|
-
r2 += 16;
|
|
4256
|
-
}
|
|
4257
|
-
if ((x & 255) == 0) {
|
|
4258
|
-
x >>= 8;
|
|
4259
|
-
r2 += 8;
|
|
4260
|
-
}
|
|
4261
|
-
if ((x & 15) == 0) {
|
|
4262
|
-
x >>= 4;
|
|
4263
|
-
r2 += 4;
|
|
4264
|
-
}
|
|
4265
|
-
if ((x & 3) == 0) {
|
|
4266
|
-
x >>= 2;
|
|
4267
|
-
r2 += 2;
|
|
4268
|
-
}
|
|
4269
|
-
if ((x & 1) == 0) {
|
|
4270
|
-
++r2;
|
|
4271
|
-
}
|
|
4272
|
-
return r2;
|
|
4273
|
-
}
|
|
4274
|
-
function cbit(x) {
|
|
4275
|
-
var r2 = 0;
|
|
4276
|
-
while (x != 0) {
|
|
4277
|
-
x &= x - 1;
|
|
4278
|
-
++r2;
|
|
4279
|
-
}
|
|
4280
|
-
return r2;
|
|
4281
|
-
}
|
|
4282
|
-
var b64map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
4283
|
-
var b64pad = "=";
|
|
4284
|
-
function hex2b64(h) {
|
|
4285
|
-
var i;
|
|
4286
|
-
var c;
|
|
4287
|
-
var ret = "";
|
|
4288
|
-
for (i = 0; i + 3 <= h.length; i += 3) {
|
|
4289
|
-
c = parseInt(h.substring(i, i + 3), 16);
|
|
4290
|
-
ret += b64map.charAt(c >> 6) + b64map.charAt(c & 63);
|
|
4291
|
-
}
|
|
4292
|
-
if (i + 1 == h.length) {
|
|
4293
|
-
c = parseInt(h.substring(i, i + 1), 16);
|
|
4294
|
-
ret += b64map.charAt(c << 2);
|
|
4295
|
-
} else if (i + 2 == h.length) {
|
|
4296
|
-
c = parseInt(h.substring(i, i + 2), 16);
|
|
4297
|
-
ret += b64map.charAt(c >> 2) + b64map.charAt((c & 3) << 4);
|
|
4298
|
-
}
|
|
4299
|
-
while ((ret.length & 3) > 0) {
|
|
4300
|
-
ret += b64pad;
|
|
4301
|
-
}
|
|
4302
|
-
return ret;
|
|
4303
|
-
}
|
|
4304
|
-
var decoder$1;
|
|
4305
|
-
var Hex = {
|
|
4306
|
-
decode: function(a) {
|
|
4307
|
-
var i;
|
|
4308
|
-
if (decoder$1 === void 0) {
|
|
4309
|
-
var hex = "0123456789ABCDEF";
|
|
4310
|
-
var ignore = " \f\n\r \u2028\u2029";
|
|
4311
|
-
decoder$1 = {};
|
|
4312
|
-
for (i = 0; i < 16; ++i) {
|
|
4313
|
-
decoder$1[hex.charAt(i)] = i;
|
|
4209
|
+
Stream2.prototype.parseStringUTF = function(start, end) {
|
|
4210
|
+
var s = "";
|
|
4211
|
+
for (var i = start; i < end; ) {
|
|
4212
|
+
var c = this.get(i++);
|
|
4213
|
+
if (c < 128) {
|
|
4214
|
+
s += String.fromCharCode(c);
|
|
4215
|
+
} else if (c > 191 && c < 224) {
|
|
4216
|
+
s += String.fromCharCode((c & 31) << 6 | this.get(i++) & 63);
|
|
4217
|
+
} else {
|
|
4218
|
+
s += String.fromCharCode((c & 15) << 12 | (this.get(i++) & 63) << 6 | this.get(i++) & 63);
|
|
4219
|
+
}
|
|
4314
4220
|
}
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4221
|
+
return s;
|
|
4222
|
+
};
|
|
4223
|
+
Stream2.prototype.parseStringBMP = function(start, end) {
|
|
4224
|
+
var str = "";
|
|
4225
|
+
var hi;
|
|
4226
|
+
var lo;
|
|
4227
|
+
for (var i = start; i < end; ) {
|
|
4228
|
+
hi = this.get(i++);
|
|
4229
|
+
lo = this.get(i++);
|
|
4230
|
+
str += String.fromCharCode(hi << 8 | lo);
|
|
4318
4231
|
}
|
|
4319
|
-
|
|
4320
|
-
|
|
4232
|
+
return str;
|
|
4233
|
+
};
|
|
4234
|
+
Stream2.prototype.parseTime = function(start, end, shortYear) {
|
|
4235
|
+
var s = this.parseStringISO(start, end);
|
|
4236
|
+
var m = (shortYear ? reTimeS : reTimeL).exec(s);
|
|
4237
|
+
if (!m) {
|
|
4238
|
+
return "Unrecognized time: " + s;
|
|
4321
4239
|
}
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
var char_count = 0;
|
|
4326
|
-
for (i = 0; i < a.length; ++i) {
|
|
4327
|
-
var c = a.charAt(i);
|
|
4328
|
-
if (c == "=") {
|
|
4329
|
-
break;
|
|
4240
|
+
if (shortYear) {
|
|
4241
|
+
m[1] = +m[1];
|
|
4242
|
+
m[1] += +m[1] < 70 ? 2e3 : 1900;
|
|
4330
4243
|
}
|
|
4331
|
-
|
|
4332
|
-
if (
|
|
4333
|
-
|
|
4244
|
+
s = m[1] + "-" + m[2] + "-" + m[3] + " " + m[4];
|
|
4245
|
+
if (m[5]) {
|
|
4246
|
+
s += ":" + m[5];
|
|
4247
|
+
if (m[6]) {
|
|
4248
|
+
s += ":" + m[6];
|
|
4249
|
+
if (m[7]) {
|
|
4250
|
+
s += "." + m[7];
|
|
4251
|
+
}
|
|
4252
|
+
}
|
|
4334
4253
|
}
|
|
4335
|
-
if (
|
|
4336
|
-
|
|
4254
|
+
if (m[8]) {
|
|
4255
|
+
s += " UTC";
|
|
4256
|
+
if (m[8] != "Z") {
|
|
4257
|
+
s += m[8];
|
|
4258
|
+
if (m[9]) {
|
|
4259
|
+
s += ":" + m[9];
|
|
4260
|
+
}
|
|
4261
|
+
}
|
|
4337
4262
|
}
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4263
|
+
return s;
|
|
4264
|
+
};
|
|
4265
|
+
Stream2.prototype.parseInteger = function(start, end) {
|
|
4266
|
+
var v = this.get(start);
|
|
4267
|
+
var neg = v > 127;
|
|
4268
|
+
var pad = neg ? 255 : 0;
|
|
4269
|
+
var len;
|
|
4270
|
+
var s = "";
|
|
4271
|
+
while (v == pad && ++start < end) {
|
|
4272
|
+
v = this.get(start);
|
|
4345
4273
|
}
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
}
|
|
4350
|
-
return out;
|
|
4351
|
-
}
|
|
4352
|
-
};
|
|
4353
|
-
var decoder;
|
|
4354
|
-
var Base64 = {
|
|
4355
|
-
decode: function(a) {
|
|
4356
|
-
var i;
|
|
4357
|
-
if (decoder === void 0) {
|
|
4358
|
-
var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
4359
|
-
var ignore = "= \f\n\r \u2028\u2029";
|
|
4360
|
-
decoder = /* @__PURE__ */ Object.create(null);
|
|
4361
|
-
for (i = 0; i < 64; ++i) {
|
|
4362
|
-
decoder[b64.charAt(i)] = i;
|
|
4274
|
+
len = end - start;
|
|
4275
|
+
if (len === 0) {
|
|
4276
|
+
return neg ? -1 : 0;
|
|
4363
4277
|
}
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4278
|
+
if (len > 4) {
|
|
4279
|
+
s = v;
|
|
4280
|
+
len <<= 3;
|
|
4281
|
+
while (((+s ^ pad) & 128) == 0) {
|
|
4282
|
+
s = +s << 1;
|
|
4283
|
+
--len;
|
|
4284
|
+
}
|
|
4285
|
+
s = "(" + len + " bit)\n";
|
|
4368
4286
|
}
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
var bits = 0;
|
|
4372
|
-
var char_count = 0;
|
|
4373
|
-
for (i = 0; i < a.length; ++i) {
|
|
4374
|
-
var c = a.charAt(i);
|
|
4375
|
-
if (c == "=") {
|
|
4376
|
-
break;
|
|
4287
|
+
if (neg) {
|
|
4288
|
+
v = v - 256;
|
|
4377
4289
|
}
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4290
|
+
var n2 = new Int10(v);
|
|
4291
|
+
for (var i = start + 1; i < end; ++i) {
|
|
4292
|
+
n2.mulAdd(256, this.get(i));
|
|
4381
4293
|
}
|
|
4382
|
-
|
|
4383
|
-
|
|
4294
|
+
return s + n2.toString();
|
|
4295
|
+
};
|
|
4296
|
+
Stream2.prototype.parseBitString = function(start, end, maxLength) {
|
|
4297
|
+
var unusedBit = this.get(start);
|
|
4298
|
+
var lenBit = (end - start - 1 << 3) - unusedBit;
|
|
4299
|
+
var intro = "(" + lenBit + " bit)\n";
|
|
4300
|
+
var s = "";
|
|
4301
|
+
for (var i = start + 1; i < end; ++i) {
|
|
4302
|
+
var b = this.get(i);
|
|
4303
|
+
var skip = i == end - 1 ? unusedBit : 0;
|
|
4304
|
+
for (var j = 7; j >= skip; --j) {
|
|
4305
|
+
s += b >> j & 1 ? "1" : "0";
|
|
4306
|
+
}
|
|
4307
|
+
if (s.length > maxLength) {
|
|
4308
|
+
return intro + stringCut(s, maxLength);
|
|
4309
|
+
}
|
|
4384
4310
|
}
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
bits = 0;
|
|
4391
|
-
char_count = 0;
|
|
4392
|
-
} else {
|
|
4393
|
-
bits <<= 6;
|
|
4394
|
-
}
|
|
4395
|
-
}
|
|
4396
|
-
switch (char_count) {
|
|
4397
|
-
case 1:
|
|
4398
|
-
throw new Error("Base64 encoding incomplete: at least 2 bits missing");
|
|
4399
|
-
case 2:
|
|
4400
|
-
out[out.length] = bits >> 10;
|
|
4401
|
-
break;
|
|
4402
|
-
case 3:
|
|
4403
|
-
out[out.length] = bits >> 16;
|
|
4404
|
-
out[out.length] = bits >> 8 & 255;
|
|
4405
|
-
break;
|
|
4406
|
-
}
|
|
4407
|
-
return out;
|
|
4408
|
-
},
|
|
4409
|
-
re: /-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,
|
|
4410
|
-
unarmor: function(a) {
|
|
4411
|
-
var m = Base64.re.exec(a);
|
|
4412
|
-
if (m) {
|
|
4413
|
-
if (m[1]) {
|
|
4414
|
-
a = m[1];
|
|
4415
|
-
} else if (m[2]) {
|
|
4416
|
-
a = m[2];
|
|
4417
|
-
} else {
|
|
4418
|
-
throw new Error("RegExp out of sync");
|
|
4419
|
-
}
|
|
4420
|
-
}
|
|
4421
|
-
return Base64.decode(a);
|
|
4422
|
-
}
|
|
4423
|
-
};
|
|
4424
|
-
var max = 1e13;
|
|
4425
|
-
var Int10 = (
|
|
4426
|
-
/** @class */
|
|
4427
|
-
function() {
|
|
4428
|
-
function Int102(value) {
|
|
4429
|
-
this.buf = [+value || 0];
|
|
4430
|
-
}
|
|
4431
|
-
Int102.prototype.mulAdd = function(m, c) {
|
|
4432
|
-
var b = this.buf;
|
|
4433
|
-
var l2 = b.length;
|
|
4434
|
-
var i;
|
|
4435
|
-
var t2;
|
|
4436
|
-
for (i = 0; i < l2; ++i) {
|
|
4437
|
-
t2 = b[i] * m + c;
|
|
4438
|
-
if (t2 < max) {
|
|
4439
|
-
c = 0;
|
|
4440
|
-
} else {
|
|
4441
|
-
c = 0 | t2 / max;
|
|
4442
|
-
t2 -= c * max;
|
|
4443
|
-
}
|
|
4444
|
-
b[i] = t2;
|
|
4445
|
-
}
|
|
4446
|
-
if (c > 0) {
|
|
4447
|
-
b[i] = c;
|
|
4448
|
-
}
|
|
4449
|
-
};
|
|
4450
|
-
Int102.prototype.sub = function(c) {
|
|
4451
|
-
var b = this.buf;
|
|
4452
|
-
var l2 = b.length;
|
|
4453
|
-
var i;
|
|
4454
|
-
var t2;
|
|
4455
|
-
for (i = 0; i < l2; ++i) {
|
|
4456
|
-
t2 = b[i] - c;
|
|
4457
|
-
if (t2 < 0) {
|
|
4458
|
-
t2 += max;
|
|
4459
|
-
c = 1;
|
|
4460
|
-
} else {
|
|
4461
|
-
c = 0;
|
|
4462
|
-
}
|
|
4463
|
-
b[i] = t2;
|
|
4464
|
-
}
|
|
4465
|
-
while (b[b.length - 1] === 0) {
|
|
4466
|
-
b.pop();
|
|
4467
|
-
}
|
|
4468
|
-
};
|
|
4469
|
-
Int102.prototype.toString = function(base) {
|
|
4470
|
-
if ((base || 10) != 10) {
|
|
4471
|
-
throw new Error("only base 10 is supported");
|
|
4472
|
-
}
|
|
4473
|
-
var b = this.buf;
|
|
4474
|
-
var s = b[b.length - 1].toString();
|
|
4475
|
-
for (var i = b.length - 2; i >= 0; --i) {
|
|
4476
|
-
s += (max + b[i]).toString().substring(1);
|
|
4477
|
-
}
|
|
4478
|
-
return s;
|
|
4479
|
-
};
|
|
4480
|
-
Int102.prototype.valueOf = function() {
|
|
4481
|
-
var b = this.buf;
|
|
4482
|
-
var v = 0;
|
|
4483
|
-
for (var i = b.length - 1; i >= 0; --i) {
|
|
4484
|
-
v = v * max + b[i];
|
|
4485
|
-
}
|
|
4486
|
-
return v;
|
|
4487
|
-
};
|
|
4488
|
-
Int102.prototype.simplify = function() {
|
|
4489
|
-
var b = this.buf;
|
|
4490
|
-
return b.length == 1 ? b[0] : this;
|
|
4491
|
-
};
|
|
4492
|
-
return Int102;
|
|
4493
|
-
}()
|
|
4494
|
-
);
|
|
4495
|
-
var ellipsis = "…";
|
|
4496
|
-
var reTimeS = /^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;
|
|
4497
|
-
var reTimeL = /^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;
|
|
4498
|
-
function stringCut(str, len) {
|
|
4499
|
-
if (str.length > len) {
|
|
4500
|
-
str = str.substring(0, len) + ellipsis;
|
|
4501
|
-
}
|
|
4502
|
-
return str;
|
|
4503
|
-
}
|
|
4504
|
-
var Stream = (
|
|
4505
|
-
/** @class */
|
|
4506
|
-
function() {
|
|
4507
|
-
function Stream2(enc, pos) {
|
|
4508
|
-
this.hexDigits = "0123456789ABCDEF";
|
|
4509
|
-
if (enc instanceof Stream2) {
|
|
4510
|
-
this.enc = enc.enc;
|
|
4511
|
-
this.pos = enc.pos;
|
|
4512
|
-
} else {
|
|
4513
|
-
this.enc = enc;
|
|
4514
|
-
this.pos = pos;
|
|
4515
|
-
}
|
|
4516
|
-
}
|
|
4517
|
-
Stream2.prototype.get = function(pos) {
|
|
4518
|
-
if (pos === void 0) {
|
|
4519
|
-
pos = this.pos++;
|
|
4520
|
-
}
|
|
4521
|
-
if (pos >= this.enc.length) {
|
|
4522
|
-
throw new Error("Requesting byte offset ".concat(pos, " on a stream of length ").concat(this.enc.length));
|
|
4523
|
-
}
|
|
4524
|
-
return "string" === typeof this.enc ? this.enc.charCodeAt(pos) : this.enc[pos];
|
|
4525
|
-
};
|
|
4526
|
-
Stream2.prototype.hexByte = function(b) {
|
|
4527
|
-
return this.hexDigits.charAt(b >> 4 & 15) + this.hexDigits.charAt(b & 15);
|
|
4528
|
-
};
|
|
4529
|
-
Stream2.prototype.hexDump = function(start, end, raw) {
|
|
4530
|
-
var s = "";
|
|
4531
|
-
for (var i = start; i < end; ++i) {
|
|
4532
|
-
s += this.hexByte(this.get(i));
|
|
4533
|
-
if (raw !== true) {
|
|
4534
|
-
switch (i & 15) {
|
|
4535
|
-
case 7:
|
|
4536
|
-
s += " ";
|
|
4537
|
-
break;
|
|
4538
|
-
case 15:
|
|
4539
|
-
s += "\n";
|
|
4540
|
-
break;
|
|
4541
|
-
default:
|
|
4542
|
-
s += " ";
|
|
4543
|
-
}
|
|
4544
|
-
}
|
|
4545
|
-
}
|
|
4546
|
-
return s;
|
|
4547
|
-
};
|
|
4548
|
-
Stream2.prototype.isASCII = function(start, end) {
|
|
4549
|
-
for (var i = start; i < end; ++i) {
|
|
4550
|
-
var c = this.get(i);
|
|
4551
|
-
if (c < 32 || c > 176) {
|
|
4552
|
-
return false;
|
|
4553
|
-
}
|
|
4554
|
-
}
|
|
4555
|
-
return true;
|
|
4556
|
-
};
|
|
4557
|
-
Stream2.prototype.parseStringISO = function(start, end) {
|
|
4558
|
-
var s = "";
|
|
4559
|
-
for (var i = start; i < end; ++i) {
|
|
4560
|
-
s += String.fromCharCode(this.get(i));
|
|
4561
|
-
}
|
|
4562
|
-
return s;
|
|
4563
|
-
};
|
|
4564
|
-
Stream2.prototype.parseStringUTF = function(start, end) {
|
|
4565
|
-
var s = "";
|
|
4566
|
-
for (var i = start; i < end; ) {
|
|
4567
|
-
var c = this.get(i++);
|
|
4568
|
-
if (c < 128) {
|
|
4569
|
-
s += String.fromCharCode(c);
|
|
4570
|
-
} else if (c > 191 && c < 224) {
|
|
4571
|
-
s += String.fromCharCode((c & 31) << 6 | this.get(i++) & 63);
|
|
4572
|
-
} else {
|
|
4573
|
-
s += String.fromCharCode((c & 15) << 12 | (this.get(i++) & 63) << 6 | this.get(i++) & 63);
|
|
4574
|
-
}
|
|
4575
|
-
}
|
|
4576
|
-
return s;
|
|
4577
|
-
};
|
|
4578
|
-
Stream2.prototype.parseStringBMP = function(start, end) {
|
|
4579
|
-
var str = "";
|
|
4580
|
-
var hi;
|
|
4581
|
-
var lo;
|
|
4582
|
-
for (var i = start; i < end; ) {
|
|
4583
|
-
hi = this.get(i++);
|
|
4584
|
-
lo = this.get(i++);
|
|
4585
|
-
str += String.fromCharCode(hi << 8 | lo);
|
|
4586
|
-
}
|
|
4587
|
-
return str;
|
|
4588
|
-
};
|
|
4589
|
-
Stream2.prototype.parseTime = function(start, end, shortYear) {
|
|
4590
|
-
var s = this.parseStringISO(start, end);
|
|
4591
|
-
var m = (shortYear ? reTimeS : reTimeL).exec(s);
|
|
4592
|
-
if (!m) {
|
|
4593
|
-
return "Unrecognized time: " + s;
|
|
4594
|
-
}
|
|
4595
|
-
if (shortYear) {
|
|
4596
|
-
m[1] = +m[1];
|
|
4597
|
-
m[1] += +m[1] < 70 ? 2e3 : 1900;
|
|
4598
|
-
}
|
|
4599
|
-
s = m[1] + "-" + m[2] + "-" + m[3] + " " + m[4];
|
|
4600
|
-
if (m[5]) {
|
|
4601
|
-
s += ":" + m[5];
|
|
4602
|
-
if (m[6]) {
|
|
4603
|
-
s += ":" + m[6];
|
|
4604
|
-
if (m[7]) {
|
|
4605
|
-
s += "." + m[7];
|
|
4606
|
-
}
|
|
4607
|
-
}
|
|
4608
|
-
}
|
|
4609
|
-
if (m[8]) {
|
|
4610
|
-
s += " UTC";
|
|
4611
|
-
if (m[8] != "Z") {
|
|
4612
|
-
s += m[8];
|
|
4613
|
-
if (m[9]) {
|
|
4614
|
-
s += ":" + m[9];
|
|
4615
|
-
}
|
|
4616
|
-
}
|
|
4617
|
-
}
|
|
4618
|
-
return s;
|
|
4619
|
-
};
|
|
4620
|
-
Stream2.prototype.parseInteger = function(start, end) {
|
|
4621
|
-
var v = this.get(start);
|
|
4622
|
-
var neg = v > 127;
|
|
4623
|
-
var pad = neg ? 255 : 0;
|
|
4624
|
-
var len;
|
|
4625
|
-
var s = "";
|
|
4626
|
-
while (v == pad && ++start < end) {
|
|
4627
|
-
v = this.get(start);
|
|
4628
|
-
}
|
|
4629
|
-
len = end - start;
|
|
4630
|
-
if (len === 0) {
|
|
4631
|
-
return neg ? -1 : 0;
|
|
4632
|
-
}
|
|
4633
|
-
if (len > 4) {
|
|
4634
|
-
s = v;
|
|
4635
|
-
len <<= 3;
|
|
4636
|
-
while (((+s ^ pad) & 128) == 0) {
|
|
4637
|
-
s = +s << 1;
|
|
4638
|
-
--len;
|
|
4639
|
-
}
|
|
4640
|
-
s = "(" + len + " bit)\n";
|
|
4641
|
-
}
|
|
4642
|
-
if (neg) {
|
|
4643
|
-
v = v - 256;
|
|
4644
|
-
}
|
|
4645
|
-
var n2 = new Int10(v);
|
|
4646
|
-
for (var i = start + 1; i < end; ++i) {
|
|
4647
|
-
n2.mulAdd(256, this.get(i));
|
|
4648
|
-
}
|
|
4649
|
-
return s + n2.toString();
|
|
4650
|
-
};
|
|
4651
|
-
Stream2.prototype.parseBitString = function(start, end, maxLength) {
|
|
4652
|
-
var unusedBit = this.get(start);
|
|
4653
|
-
var lenBit = (end - start - 1 << 3) - unusedBit;
|
|
4654
|
-
var intro = "(" + lenBit + " bit)\n";
|
|
4655
|
-
var s = "";
|
|
4656
|
-
for (var i = start + 1; i < end; ++i) {
|
|
4657
|
-
var b = this.get(i);
|
|
4658
|
-
var skip = i == end - 1 ? unusedBit : 0;
|
|
4659
|
-
for (var j = 7; j >= skip; --j) {
|
|
4660
|
-
s += b >> j & 1 ? "1" : "0";
|
|
4661
|
-
}
|
|
4662
|
-
if (s.length > maxLength) {
|
|
4663
|
-
return intro + stringCut(s, maxLength);
|
|
4664
|
-
}
|
|
4665
|
-
}
|
|
4666
|
-
return intro + s;
|
|
4667
|
-
};
|
|
4668
|
-
Stream2.prototype.parseOctetString = function(start, end, maxLength) {
|
|
4669
|
-
if (this.isASCII(start, end)) {
|
|
4670
|
-
return stringCut(this.parseStringISO(start, end), maxLength);
|
|
4311
|
+
return intro + s;
|
|
4312
|
+
};
|
|
4313
|
+
Stream2.prototype.parseOctetString = function(start, end, maxLength) {
|
|
4314
|
+
if (this.isASCII(start, end)) {
|
|
4315
|
+
return stringCut(this.parseStringISO(start, end), maxLength);
|
|
4671
4316
|
}
|
|
4672
4317
|
var len = end - start;
|
|
4673
4318
|
var s = "(" + len + " byte)\n";
|
|
@@ -7814,154 +7459,1207 @@ var __extends = /* @__PURE__ */ function() {
|
|
|
7814
7459
|
var bit_string = new KJUR.asn1.DERBitString({
|
|
7815
7460
|
hex: "00" + second_sequence.getEncodedHex()
|
|
7816
7461
|
});
|
|
7817
|
-
var seq = new KJUR.asn1.DERSequence({
|
|
7818
|
-
array: [first_sequence, bit_string]
|
|
7462
|
+
var seq = new KJUR.asn1.DERSequence({
|
|
7463
|
+
array: [first_sequence, bit_string]
|
|
7464
|
+
});
|
|
7465
|
+
return seq.getEncodedHex();
|
|
7466
|
+
};
|
|
7467
|
+
JSEncryptRSAKey.prototype.getPublicBaseKeyB64 = function() {
|
|
7468
|
+
return hex2b64(this.getPublicBaseKey());
|
|
7469
|
+
};
|
|
7470
|
+
JSEncryptRSAKey.wordwrap = function(str, width) {
|
|
7471
|
+
width = width || 64;
|
|
7472
|
+
if (!str) {
|
|
7473
|
+
return str;
|
|
7474
|
+
}
|
|
7475
|
+
var regex2 = "(.{1," + width + "})( +|$\n?)|(.{1," + width + "})";
|
|
7476
|
+
return str.match(RegExp(regex2, "g")).join("\n");
|
|
7477
|
+
};
|
|
7478
|
+
JSEncryptRSAKey.prototype.getPrivateKey = function() {
|
|
7479
|
+
var key = "-----BEGIN RSA PRIVATE KEY-----\n";
|
|
7480
|
+
key += JSEncryptRSAKey.wordwrap(this.getPrivateBaseKeyB64()) + "\n";
|
|
7481
|
+
key += "-----END RSA PRIVATE KEY-----";
|
|
7482
|
+
return key;
|
|
7483
|
+
};
|
|
7484
|
+
JSEncryptRSAKey.prototype.getPublicKey = function() {
|
|
7485
|
+
var key = "-----BEGIN PUBLIC KEY-----\n";
|
|
7486
|
+
key += JSEncryptRSAKey.wordwrap(this.getPublicBaseKeyB64()) + "\n";
|
|
7487
|
+
key += "-----END PUBLIC KEY-----";
|
|
7488
|
+
return key;
|
|
7489
|
+
};
|
|
7490
|
+
JSEncryptRSAKey.hasPublicKeyProperty = function(obj) {
|
|
7491
|
+
obj = obj || {};
|
|
7492
|
+
return obj.hasOwnProperty("n") && obj.hasOwnProperty("e");
|
|
7493
|
+
};
|
|
7494
|
+
JSEncryptRSAKey.hasPrivateKeyProperty = function(obj) {
|
|
7495
|
+
obj = obj || {};
|
|
7496
|
+
return obj.hasOwnProperty("n") && obj.hasOwnProperty("e") && obj.hasOwnProperty("d") && obj.hasOwnProperty("p") && obj.hasOwnProperty("q") && obj.hasOwnProperty("dmp1") && obj.hasOwnProperty("dmq1") && obj.hasOwnProperty("coeff");
|
|
7497
|
+
};
|
|
7498
|
+
JSEncryptRSAKey.prototype.parsePropertiesFrom = function(obj) {
|
|
7499
|
+
this.n = obj.n;
|
|
7500
|
+
this.e = obj.e;
|
|
7501
|
+
if (obj.hasOwnProperty("d")) {
|
|
7502
|
+
this.d = obj.d;
|
|
7503
|
+
this.p = obj.p;
|
|
7504
|
+
this.q = obj.q;
|
|
7505
|
+
this.dmp1 = obj.dmp1;
|
|
7506
|
+
this.dmq1 = obj.dmq1;
|
|
7507
|
+
this.coeff = obj.coeff;
|
|
7508
|
+
}
|
|
7509
|
+
};
|
|
7510
|
+
return JSEncryptRSAKey;
|
|
7511
|
+
})(RSAKey);
|
|
7512
|
+
var _a;
|
|
7513
|
+
typeof process !== "undefined" ? (_a = process.env) === null || _a === void 0 ? void 0 : _a.npm_package_version : void 0;
|
|
7514
|
+
const { wsCache: wsCache$2 } = useCache();
|
|
7515
|
+
const AccessTokenKey = "ACCESS_TOKEN";
|
|
7516
|
+
const RefreshTokenKey = "REFRESH_TOKEN";
|
|
7517
|
+
const removeToken = () => {
|
|
7518
|
+
wsCache$2.delete(AccessTokenKey);
|
|
7519
|
+
wsCache$2.delete(RefreshTokenKey);
|
|
7520
|
+
};
|
|
7521
|
+
const { wsCache: wsCache$1 } = useCache();
|
|
7522
|
+
const useUserStore = defineStore("layout-user", {
|
|
7523
|
+
state: () => ({
|
|
7524
|
+
permissions: /* @__PURE__ */ new Set(),
|
|
7525
|
+
roles: [],
|
|
7526
|
+
isSetUser: false,
|
|
7527
|
+
user: {
|
|
7528
|
+
id: 0,
|
|
7529
|
+
avatar: "",
|
|
7530
|
+
nickname: "",
|
|
7531
|
+
deptId: 0,
|
|
7532
|
+
mobile: "",
|
|
7533
|
+
email: "",
|
|
7534
|
+
username: ""
|
|
7535
|
+
}
|
|
7536
|
+
}),
|
|
7537
|
+
getters: {
|
|
7538
|
+
getPermissions() {
|
|
7539
|
+
return this.permissions;
|
|
7540
|
+
},
|
|
7541
|
+
getRoles() {
|
|
7542
|
+
return this.roles;
|
|
7543
|
+
},
|
|
7544
|
+
getIsSetUser() {
|
|
7545
|
+
return this.isSetUser;
|
|
7546
|
+
},
|
|
7547
|
+
getUser() {
|
|
7548
|
+
return this.user;
|
|
7549
|
+
},
|
|
7550
|
+
getUserInfo() {
|
|
7551
|
+
const userInfo = wsCache$1.get(CACHE_KEY.USER);
|
|
7552
|
+
return userInfo;
|
|
7553
|
+
}
|
|
7554
|
+
},
|
|
7555
|
+
actions: {
|
|
7556
|
+
// 从缓存加载用户信息到state
|
|
7557
|
+
loadUserFromCacheAction(userInfo) {
|
|
7558
|
+
this.permissions = new Set(userInfo.permissions);
|
|
7559
|
+
this.roles = userInfo.roles;
|
|
7560
|
+
this.user = userInfo.user;
|
|
7561
|
+
this.isSetUser = true;
|
|
7562
|
+
wsCache$1.set(CACHE_KEY.USER, userInfo);
|
|
7563
|
+
wsCache$1.set(CACHE_KEY.ROLE_ROUTERS, userInfo.menus);
|
|
7564
|
+
},
|
|
7565
|
+
async setUserAvatarAction(avatar) {
|
|
7566
|
+
const userInfo = wsCache$1.get(CACHE_KEY.USER);
|
|
7567
|
+
this.user.avatar = avatar;
|
|
7568
|
+
userInfo.user.avatar = avatar;
|
|
7569
|
+
wsCache$1.set(CACHE_KEY.USER, userInfo);
|
|
7570
|
+
},
|
|
7571
|
+
async setUserNicknameAction(nickname) {
|
|
7572
|
+
const userInfo = wsCache$1.get(CACHE_KEY.USER);
|
|
7573
|
+
this.user.nickname = nickname;
|
|
7574
|
+
userInfo.user.nickname = nickname;
|
|
7575
|
+
wsCache$1.set(CACHE_KEY.USER, userInfo);
|
|
7576
|
+
},
|
|
7577
|
+
// 更新用户资料(昵称、手机号、邮箱)
|
|
7578
|
+
async updateUserProfileAction(user) {
|
|
7579
|
+
const userInfo = wsCache$1.get(CACHE_KEY.USER);
|
|
7580
|
+
this.user.nickname = user.nickname;
|
|
7581
|
+
this.user.mobile = user.mobile;
|
|
7582
|
+
this.user.email = user.email;
|
|
7583
|
+
userInfo.user.nickname = user.nickname;
|
|
7584
|
+
userInfo.user.mobile = user.mobile;
|
|
7585
|
+
userInfo.user.email = user.email;
|
|
7586
|
+
wsCache$1.set(CACHE_KEY.USER, userInfo);
|
|
7587
|
+
},
|
|
7588
|
+
async loginOut() {
|
|
7589
|
+
removeToken();
|
|
7590
|
+
deleteUserCache();
|
|
7591
|
+
this.resetState();
|
|
7592
|
+
},
|
|
7593
|
+
resetState() {
|
|
7594
|
+
this.permissions = /* @__PURE__ */ new Set();
|
|
7595
|
+
this.roles = [];
|
|
7596
|
+
this.isSetUser = false;
|
|
7597
|
+
this.user = {
|
|
7598
|
+
id: 0,
|
|
7599
|
+
avatar: "",
|
|
7600
|
+
nickname: "",
|
|
7601
|
+
deptId: 0
|
|
7602
|
+
};
|
|
7603
|
+
}
|
|
7604
|
+
}
|
|
7605
|
+
});
|
|
7606
|
+
const useUserStoreWithOut = () => {
|
|
7607
|
+
return useUserStore(store);
|
|
7608
|
+
};
|
|
7609
|
+
const useTagsViewStore = defineStore("layout-tagsView", {
|
|
7610
|
+
state: () => ({
|
|
7611
|
+
visitedViews: [],
|
|
7612
|
+
cachedViews: /* @__PURE__ */ new Set(),
|
|
7613
|
+
selectedTag: void 0
|
|
7614
|
+
}),
|
|
7615
|
+
getters: {
|
|
7616
|
+
getVisitedViews() {
|
|
7617
|
+
return this.visitedViews;
|
|
7618
|
+
},
|
|
7619
|
+
getCachedViews() {
|
|
7620
|
+
return Array.from(this.cachedViews);
|
|
7621
|
+
},
|
|
7622
|
+
getSelectedTag() {
|
|
7623
|
+
return this.selectedTag;
|
|
7624
|
+
}
|
|
7625
|
+
},
|
|
7626
|
+
actions: {
|
|
7627
|
+
// 新增缓存和tag
|
|
7628
|
+
addView(view) {
|
|
7629
|
+
this.addVisitedView(view);
|
|
7630
|
+
this.addCachedView();
|
|
7631
|
+
},
|
|
7632
|
+
// 新增tag
|
|
7633
|
+
addVisitedView(view) {
|
|
7634
|
+
var _a2, _b;
|
|
7635
|
+
if (this.visitedViews.some((v) => v.fullPath === view.fullPath))
|
|
7636
|
+
return;
|
|
7637
|
+
if ((_a2 = view.meta) == null ? void 0 : _a2.noTagsView)
|
|
7638
|
+
return;
|
|
7639
|
+
const visitedView = Object.assign({}, view, { title: ((_b = view.meta) == null ? void 0 : _b.title) || "no-name" });
|
|
7640
|
+
if (visitedView.meta) {
|
|
7641
|
+
const titleSuffixList = [];
|
|
7642
|
+
this.visitedViews.forEach((v) => {
|
|
7643
|
+
var _a3, _b2, _c;
|
|
7644
|
+
if (v.path === visitedView.path && ((_a3 = v.meta) == null ? void 0 : _a3.title) === ((_b2 = visitedView.meta) == null ? void 0 : _b2.title)) {
|
|
7645
|
+
titleSuffixList.push(((_c = v.meta) == null ? void 0 : _c.titleSuffix) || "1");
|
|
7646
|
+
}
|
|
7647
|
+
});
|
|
7648
|
+
if (titleSuffixList.length) {
|
|
7649
|
+
let titleSuffix = 1;
|
|
7650
|
+
while (titleSuffixList.includes(`${titleSuffix}`)) {
|
|
7651
|
+
titleSuffix += 1;
|
|
7652
|
+
}
|
|
7653
|
+
visitedView.meta.titleSuffix = titleSuffix === 1 ? void 0 : `${titleSuffix}`;
|
|
7654
|
+
}
|
|
7655
|
+
}
|
|
7656
|
+
this.visitedViews.push(visitedView);
|
|
7657
|
+
},
|
|
7658
|
+
// 新增缓存
|
|
7659
|
+
addCachedView() {
|
|
7660
|
+
var _a2;
|
|
7661
|
+
const cacheMap = /* @__PURE__ */ new Set();
|
|
7662
|
+
for (const v of this.visitedViews) {
|
|
7663
|
+
const item = getRawRoute(v);
|
|
7664
|
+
const needCache = !((_a2 = item.meta) == null ? void 0 : _a2.noCache);
|
|
7665
|
+
if (!needCache) {
|
|
7666
|
+
continue;
|
|
7667
|
+
}
|
|
7668
|
+
const name = item.name;
|
|
7669
|
+
cacheMap.add(name);
|
|
7670
|
+
}
|
|
7671
|
+
if (Array.from(this.cachedViews).sort().toString() === Array.from(cacheMap).sort().toString())
|
|
7672
|
+
return;
|
|
7673
|
+
this.cachedViews = cacheMap;
|
|
7674
|
+
},
|
|
7675
|
+
// 删除某个
|
|
7676
|
+
delView(view) {
|
|
7677
|
+
this.delVisitedView(view);
|
|
7678
|
+
this.delCachedView();
|
|
7679
|
+
},
|
|
7680
|
+
// 删除tag
|
|
7681
|
+
delVisitedView(view) {
|
|
7682
|
+
for (const [i, v] of this.visitedViews.entries()) {
|
|
7683
|
+
if (v.fullPath === view.fullPath) {
|
|
7684
|
+
this.visitedViews.splice(i, 1);
|
|
7685
|
+
break;
|
|
7686
|
+
}
|
|
7687
|
+
}
|
|
7688
|
+
},
|
|
7689
|
+
// 删除缓存
|
|
7690
|
+
delCachedView() {
|
|
7691
|
+
var _a2;
|
|
7692
|
+
if (((_a2 = this.selectedTag) == null ? void 0 : _a2.name) && this.cachedViews.has(this.selectedTag.name)) {
|
|
7693
|
+
this.cachedViews.delete(this.selectedTag.name);
|
|
7694
|
+
}
|
|
7695
|
+
},
|
|
7696
|
+
// 删除所有缓存和tag
|
|
7697
|
+
delAllViews() {
|
|
7698
|
+
this.delAllVisitedViews();
|
|
7699
|
+
this.delCachedView();
|
|
7700
|
+
},
|
|
7701
|
+
// 删除所有tag
|
|
7702
|
+
delAllVisitedViews() {
|
|
7703
|
+
const userStore = useUserStoreWithOut();
|
|
7704
|
+
this.visitedViews = userStore.getUser ? this.visitedViews.filter((tag) => {
|
|
7705
|
+
var _a2;
|
|
7706
|
+
return (_a2 = tag == null ? void 0 : tag.meta) == null ? void 0 : _a2.affix;
|
|
7707
|
+
}) : [];
|
|
7708
|
+
},
|
|
7709
|
+
// 删除其他
|
|
7710
|
+
delOthersViews(view) {
|
|
7711
|
+
this.delOthersVisitedViews(view);
|
|
7712
|
+
this.addCachedView();
|
|
7713
|
+
},
|
|
7714
|
+
// 删除其他tag
|
|
7715
|
+
delOthersVisitedViews(view) {
|
|
7716
|
+
this.visitedViews = this.visitedViews.filter((v) => {
|
|
7717
|
+
var _a2;
|
|
7718
|
+
return ((_a2 = v == null ? void 0 : v.meta) == null ? void 0 : _a2.affix) || v.fullPath === view.fullPath;
|
|
7719
|
+
});
|
|
7720
|
+
},
|
|
7721
|
+
// 删除左侧
|
|
7722
|
+
delLeftViews(view) {
|
|
7723
|
+
const index = findIndex(
|
|
7724
|
+
this.visitedViews,
|
|
7725
|
+
(v) => v.fullPath === view.fullPath
|
|
7726
|
+
);
|
|
7727
|
+
if (index > -1) {
|
|
7728
|
+
this.visitedViews = this.visitedViews.filter((v, i) => {
|
|
7729
|
+
var _a2;
|
|
7730
|
+
return ((_a2 = v == null ? void 0 : v.meta) == null ? void 0 : _a2.affix) || v.fullPath === view.fullPath || i > index;
|
|
7731
|
+
});
|
|
7732
|
+
this.addCachedView();
|
|
7733
|
+
}
|
|
7734
|
+
},
|
|
7735
|
+
// 删除右侧
|
|
7736
|
+
delRightViews(view) {
|
|
7737
|
+
const index = findIndex(
|
|
7738
|
+
this.visitedViews,
|
|
7739
|
+
(v) => v.fullPath === view.fullPath
|
|
7740
|
+
);
|
|
7741
|
+
if (index > -1) {
|
|
7742
|
+
this.visitedViews = this.visitedViews.filter((v, i) => {
|
|
7743
|
+
var _a2;
|
|
7744
|
+
return ((_a2 = v == null ? void 0 : v.meta) == null ? void 0 : _a2.affix) || v.fullPath === view.fullPath || i < index;
|
|
7745
|
+
});
|
|
7746
|
+
this.addCachedView();
|
|
7747
|
+
}
|
|
7748
|
+
},
|
|
7749
|
+
updateVisitedView(view) {
|
|
7750
|
+
for (let v of this.visitedViews) {
|
|
7751
|
+
if (v.fullPath === view.fullPath) {
|
|
7752
|
+
v = Object.assign(v, view);
|
|
7753
|
+
break;
|
|
7754
|
+
}
|
|
7755
|
+
}
|
|
7756
|
+
},
|
|
7757
|
+
// 设置当前选中的 tag
|
|
7758
|
+
setSelectedTag(tag) {
|
|
7759
|
+
this.selectedTag = tag;
|
|
7760
|
+
},
|
|
7761
|
+
setTitle(title, path) {
|
|
7762
|
+
var _a2;
|
|
7763
|
+
for (const v of this.visitedViews) {
|
|
7764
|
+
if (v.path === (path ?? ((_a2 = this.selectedTag) == null ? void 0 : _a2.path))) {
|
|
7765
|
+
v.meta.title = title;
|
|
7766
|
+
break;
|
|
7767
|
+
}
|
|
7768
|
+
}
|
|
7769
|
+
}
|
|
7770
|
+
},
|
|
7771
|
+
persist: false
|
|
7772
|
+
});
|
|
7773
|
+
const useTagsViewStoreWithOut = () => {
|
|
7774
|
+
return useTagsViewStore(store);
|
|
7775
|
+
};
|
|
7776
|
+
const filterAffixTags = (routes, parentPath = "") => {
|
|
7777
|
+
let tags = [];
|
|
7778
|
+
routes.forEach((route) => {
|
|
7779
|
+
const meta = route.meta;
|
|
7780
|
+
const tagPath = pathResolve(parentPath, route.path);
|
|
7781
|
+
if (meta == null ? void 0 : meta.affix) {
|
|
7782
|
+
tags.push({ ...route, path: tagPath, fullPath: tagPath });
|
|
7783
|
+
}
|
|
7784
|
+
if (route.children) {
|
|
7785
|
+
const tempTags = filterAffixTags(route.children, tagPath);
|
|
7786
|
+
if (tempTags.length >= 1) {
|
|
7787
|
+
tags = [...tags, ...tempTags];
|
|
7788
|
+
}
|
|
7789
|
+
}
|
|
7790
|
+
});
|
|
7791
|
+
return tags;
|
|
7792
|
+
};
|
|
7793
|
+
const _sfc_main$u = /* @__PURE__ */ Object.assign({ name: "ContextMenu" }, {
|
|
7794
|
+
__name: "ContextMenu",
|
|
7795
|
+
props: {
|
|
7796
|
+
schema: {
|
|
7797
|
+
type: Array,
|
|
7798
|
+
default: () => []
|
|
7799
|
+
},
|
|
7800
|
+
trigger: {
|
|
7801
|
+
type: String,
|
|
7802
|
+
default: "contextmenu"
|
|
7803
|
+
},
|
|
7804
|
+
tagItem: {
|
|
7805
|
+
type: Object,
|
|
7806
|
+
default: () => ({})
|
|
7807
|
+
}
|
|
7808
|
+
},
|
|
7809
|
+
emits: ["visibleChange"],
|
|
7810
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
7811
|
+
const { getPrefixCls: getPrefixCls2 } = useDesign();
|
|
7812
|
+
const prefixCls2 = getPrefixCls2("context-menu");
|
|
7813
|
+
const { t: t2 } = useI18n("layout");
|
|
7814
|
+
const emit = __emit;
|
|
7815
|
+
const props = __props;
|
|
7816
|
+
const command = (item) => {
|
|
7817
|
+
item.command && item.command(item);
|
|
7818
|
+
};
|
|
7819
|
+
const visibleChange = (visible) => {
|
|
7820
|
+
emit("visibleChange", visible, props.tagItem);
|
|
7821
|
+
};
|
|
7822
|
+
const elDropdownMenuRef = ref();
|
|
7823
|
+
__expose({
|
|
7824
|
+
elDropdownMenuRef,
|
|
7825
|
+
tagItem: props.tagItem
|
|
7826
|
+
});
|
|
7827
|
+
return (_ctx, _cache) => {
|
|
7828
|
+
const _component_Icon = resolveComponent("Icon");
|
|
7829
|
+
return openBlock(), createBlock(unref(ElDropdown), {
|
|
7830
|
+
ref_key: "elDropdownMenuRef",
|
|
7831
|
+
ref: elDropdownMenuRef,
|
|
7832
|
+
class: normalizeClass(unref(prefixCls2)),
|
|
7833
|
+
trigger: __props.trigger,
|
|
7834
|
+
placement: "bottom-start",
|
|
7835
|
+
"popper-class": "v-context-menu-popper",
|
|
7836
|
+
onCommand: command,
|
|
7837
|
+
onVisibleChange: visibleChange
|
|
7838
|
+
}, {
|
|
7839
|
+
dropdown: withCtx(() => [
|
|
7840
|
+
createVNode(unref(ElDropdownMenu), null, {
|
|
7841
|
+
default: withCtx(() => [
|
|
7842
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.schema, (item, index) => {
|
|
7843
|
+
return openBlock(), createBlock(unref(ElDropdownItem), {
|
|
7844
|
+
key: `dropdown${index}`,
|
|
7845
|
+
command: item,
|
|
7846
|
+
disabled: item.disabled,
|
|
7847
|
+
divided: item.divided
|
|
7848
|
+
}, {
|
|
7849
|
+
default: withCtx(() => [
|
|
7850
|
+
item.icon ? (openBlock(), createBlock(_component_Icon, {
|
|
7851
|
+
key: 0,
|
|
7852
|
+
icon: item.icon
|
|
7853
|
+
}, null, 8, ["icon"])) : createCommentVNode("", true),
|
|
7854
|
+
createTextVNode(" " + toDisplayString(unref(t2)(item.label)), 1)
|
|
7855
|
+
]),
|
|
7856
|
+
_: 2
|
|
7857
|
+
}, 1032, ["command", "disabled", "divided"]);
|
|
7858
|
+
}), 128))
|
|
7859
|
+
]),
|
|
7860
|
+
_: 1
|
|
7861
|
+
})
|
|
7862
|
+
]),
|
|
7863
|
+
default: withCtx(() => [
|
|
7864
|
+
renderSlot(_ctx.$slots, "default")
|
|
7865
|
+
]),
|
|
7866
|
+
_: 3
|
|
7867
|
+
}, 8, ["class", "trigger"]);
|
|
7868
|
+
};
|
|
7869
|
+
}
|
|
7870
|
+
});
|
|
7871
|
+
const useTagsView = () => {
|
|
7872
|
+
const tagsViewStore = useTagsViewStoreWithOut();
|
|
7873
|
+
const { replace, currentRoute } = useRouter();
|
|
7874
|
+
const selectedTag = computed(() => tagsViewStore.getSelectedTag);
|
|
7875
|
+
const closeAll = (callback2) => {
|
|
7876
|
+
tagsViewStore.delAllViews();
|
|
7877
|
+
callback2 == null ? void 0 : callback2();
|
|
7878
|
+
};
|
|
7879
|
+
const closeLeft = (callback2) => {
|
|
7880
|
+
tagsViewStore.delLeftViews(unref(selectedTag));
|
|
7881
|
+
callback2 == null ? void 0 : callback2();
|
|
7882
|
+
};
|
|
7883
|
+
const closeRight = (callback2) => {
|
|
7884
|
+
tagsViewStore.delRightViews(unref(selectedTag));
|
|
7885
|
+
callback2 == null ? void 0 : callback2();
|
|
7886
|
+
};
|
|
7887
|
+
const closeOther = (callback2) => {
|
|
7888
|
+
tagsViewStore.delOthersViews(unref(selectedTag));
|
|
7889
|
+
callback2 == null ? void 0 : callback2();
|
|
7890
|
+
};
|
|
7891
|
+
const closeCurrent = (view, callback2) => {
|
|
7892
|
+
var _a2;
|
|
7893
|
+
if ((_a2 = view == null ? void 0 : view.meta) == null ? void 0 : _a2.affix)
|
|
7894
|
+
return;
|
|
7895
|
+
tagsViewStore.delView(view || unref(currentRoute));
|
|
7896
|
+
callback2 == null ? void 0 : callback2();
|
|
7897
|
+
};
|
|
7898
|
+
const refreshPage = async (view, callback2) => {
|
|
7899
|
+
tagsViewStore.delCachedView();
|
|
7900
|
+
const { path, query } = view || unref(currentRoute);
|
|
7901
|
+
await nextTick();
|
|
7902
|
+
replace({
|
|
7903
|
+
path: "/redirect" + path,
|
|
7904
|
+
query
|
|
7905
|
+
});
|
|
7906
|
+
callback2 == null ? void 0 : callback2();
|
|
7907
|
+
};
|
|
7908
|
+
const setTitle = (title, path) => {
|
|
7909
|
+
tagsViewStore.setTitle(title, path);
|
|
7910
|
+
};
|
|
7911
|
+
return {
|
|
7912
|
+
closeAll,
|
|
7913
|
+
closeLeft,
|
|
7914
|
+
closeRight,
|
|
7915
|
+
closeOther,
|
|
7916
|
+
closeCurrent,
|
|
7917
|
+
refreshPage,
|
|
7918
|
+
setTitle
|
|
7919
|
+
};
|
|
7920
|
+
};
|
|
7921
|
+
const easeInOutQuad = (t2, b, c, d) => {
|
|
7922
|
+
t2 /= d / 2;
|
|
7923
|
+
if (t2 < 1) {
|
|
7924
|
+
return c / 2 * t2 * t2 + b;
|
|
7925
|
+
}
|
|
7926
|
+
t2--;
|
|
7927
|
+
return -c / 2 * (t2 * (t2 - 2) - 1) + b;
|
|
7928
|
+
};
|
|
7929
|
+
const move = (el, position, amount) => {
|
|
7930
|
+
el[position] = amount;
|
|
7931
|
+
};
|
|
7932
|
+
function useScrollTo({
|
|
7933
|
+
el,
|
|
7934
|
+
position = "scrollLeft",
|
|
7935
|
+
to,
|
|
7936
|
+
duration = 500,
|
|
7937
|
+
callback: callback2
|
|
7938
|
+
}) {
|
|
7939
|
+
const isActiveRef = ref(false);
|
|
7940
|
+
const start = el[position];
|
|
7941
|
+
const change = to - start;
|
|
7942
|
+
const increment = 20;
|
|
7943
|
+
let currentTime = 0;
|
|
7944
|
+
function animateScroll() {
|
|
7945
|
+
if (!unref(isActiveRef)) {
|
|
7946
|
+
return;
|
|
7947
|
+
}
|
|
7948
|
+
currentTime += increment;
|
|
7949
|
+
const val = easeInOutQuad(currentTime, start, change, duration);
|
|
7950
|
+
move(el, position, val);
|
|
7951
|
+
if (currentTime < duration && unref(isActiveRef)) {
|
|
7952
|
+
requestAnimationFrame(animateScroll);
|
|
7953
|
+
} else {
|
|
7954
|
+
if (callback2) {
|
|
7955
|
+
callback2();
|
|
7956
|
+
}
|
|
7957
|
+
}
|
|
7958
|
+
}
|
|
7959
|
+
function run() {
|
|
7960
|
+
isActiveRef.value = true;
|
|
7961
|
+
animateScroll();
|
|
7962
|
+
}
|
|
7963
|
+
function stop() {
|
|
7964
|
+
isActiveRef.value = false;
|
|
7965
|
+
}
|
|
7966
|
+
return { start: run, stop };
|
|
7967
|
+
}
|
|
7968
|
+
const _hoisted_1$d = ["id"];
|
|
7969
|
+
const _hoisted_2$b = { class: "flex-1 overflow-hidden px-20px" };
|
|
7970
|
+
const _hoisted_3$a = { class: "h-[var(--tags-view-height)] flex" };
|
|
7971
|
+
const _hoisted_4$8 = ["onClick"];
|
|
7972
|
+
const _sfc_main$t = /* @__PURE__ */ Object.assign({ name: "TagsView" }, {
|
|
7973
|
+
__name: "TagsView",
|
|
7974
|
+
setup(__props) {
|
|
7975
|
+
const { getPrefixCls: getPrefixCls2 } = useDesign();
|
|
7976
|
+
const prefixCls2 = getPrefixCls2("tags-view");
|
|
7977
|
+
const { t: t2 } = useI18n();
|
|
7978
|
+
const { currentRoute, push } = useRouter();
|
|
7979
|
+
const { closeAll, closeOther, closeCurrent, refreshPage } = useTagsView();
|
|
7980
|
+
const permissionStore = usePermissionStore();
|
|
7981
|
+
const routers = computed(() => permissionStore.getRouters);
|
|
7982
|
+
const tagsViewStore = useTagsViewStore();
|
|
7983
|
+
const visitedViews = computed(() => tagsViewStore.getVisitedViews);
|
|
7984
|
+
const affixTagArr = ref([]);
|
|
7985
|
+
const selectedTag = computed(() => tagsViewStore.getSelectedTag);
|
|
7986
|
+
const setSelectTag = tagsViewStore.setSelectedTag;
|
|
7987
|
+
const initTags = () => {
|
|
7988
|
+
affixTagArr.value = filterAffixTags(unref(routers));
|
|
7989
|
+
for (const tag of unref(affixTagArr)) {
|
|
7990
|
+
if (tag.name) {
|
|
7991
|
+
tagsViewStore.addVisitedView(cloneDeep(tag));
|
|
7992
|
+
}
|
|
7993
|
+
}
|
|
7994
|
+
};
|
|
7995
|
+
const addTags = () => {
|
|
7996
|
+
const { name } = unref(currentRoute);
|
|
7997
|
+
if (name) {
|
|
7998
|
+
setSelectTag(unref(currentRoute));
|
|
7999
|
+
tagsViewStore.addView(unref(currentRoute));
|
|
8000
|
+
}
|
|
8001
|
+
};
|
|
8002
|
+
const refreshSelectedTag = async (view) => {
|
|
8003
|
+
refreshPage(view);
|
|
8004
|
+
};
|
|
8005
|
+
const closeSelectedTag = (view) => {
|
|
8006
|
+
closeCurrent(view, () => {
|
|
8007
|
+
if (isActive(view)) {
|
|
8008
|
+
toLastView();
|
|
8009
|
+
}
|
|
8010
|
+
});
|
|
8011
|
+
};
|
|
8012
|
+
const closeOthersTags = () => {
|
|
8013
|
+
closeOther();
|
|
8014
|
+
};
|
|
8015
|
+
const closeAllTags = () => {
|
|
8016
|
+
closeAll(() => {
|
|
8017
|
+
toLastView();
|
|
8018
|
+
});
|
|
8019
|
+
};
|
|
8020
|
+
const toLastView = () => {
|
|
8021
|
+
const visitedViews2 = tagsViewStore.getVisitedViews;
|
|
8022
|
+
const latestView = visitedViews2.slice(-1)[0];
|
|
8023
|
+
if (latestView) {
|
|
8024
|
+
push(latestView);
|
|
8025
|
+
} else {
|
|
8026
|
+
push({
|
|
8027
|
+
path: "/"
|
|
8028
|
+
});
|
|
8029
|
+
}
|
|
8030
|
+
};
|
|
8031
|
+
const moveToCurrentTag = async () => {
|
|
8032
|
+
await nextTick();
|
|
8033
|
+
setTimeout(() => {
|
|
8034
|
+
for (const v of unref(visitedViews)) {
|
|
8035
|
+
if (v.fullPath === unref(currentRoute).fullPath) {
|
|
8036
|
+
moveToTarget(v);
|
|
8037
|
+
break;
|
|
8038
|
+
}
|
|
8039
|
+
}
|
|
8040
|
+
}, 0);
|
|
8041
|
+
};
|
|
8042
|
+
const tagLinksRefs = useTemplateRefsList();
|
|
8043
|
+
const moveToTarget = (currentTag) => {
|
|
8044
|
+
var _a2;
|
|
8045
|
+
const wrap$ = (_a2 = unref(scrollbarRef)) == null ? void 0 : _a2.wrapRef;
|
|
8046
|
+
if (!wrap$)
|
|
8047
|
+
return;
|
|
8048
|
+
let firstTag = null;
|
|
8049
|
+
let lastTag = null;
|
|
8050
|
+
const tagList = unref(tagLinksRefs);
|
|
8051
|
+
if (tagList.length > 0) {
|
|
8052
|
+
firstTag = tagList[0];
|
|
8053
|
+
lastTag = tagList[tagList.length - 1];
|
|
8054
|
+
}
|
|
8055
|
+
if ((firstTag == null ? void 0 : firstTag.to).fullPath === currentTag.fullPath) {
|
|
8056
|
+
const { start } = useScrollTo({
|
|
8057
|
+
el: wrap$,
|
|
8058
|
+
position: "scrollLeft",
|
|
8059
|
+
to: 0,
|
|
8060
|
+
duration: 500
|
|
8061
|
+
});
|
|
8062
|
+
start();
|
|
8063
|
+
} else if ((lastTag == null ? void 0 : lastTag.to).fullPath === currentTag.fullPath) {
|
|
8064
|
+
const { start } = useScrollTo({
|
|
8065
|
+
el: wrap$,
|
|
8066
|
+
position: "scrollLeft",
|
|
8067
|
+
to: wrap$.scrollWidth - wrap$.offsetWidth,
|
|
8068
|
+
duration: 500
|
|
8069
|
+
});
|
|
8070
|
+
start();
|
|
8071
|
+
} else {
|
|
8072
|
+
const currentIndex = tagList.findIndex(
|
|
8073
|
+
(item) => (item == null ? void 0 : item.to).fullPath === currentTag.fullPath
|
|
8074
|
+
);
|
|
8075
|
+
const tgsRefs = document.getElementsByClassName(`${prefixCls2}__item`);
|
|
8076
|
+
const prevTag = tgsRefs[currentIndex - 1];
|
|
8077
|
+
const nextTag = tgsRefs[currentIndex + 1];
|
|
8078
|
+
if (!prevTag || !nextTag)
|
|
8079
|
+
return;
|
|
8080
|
+
const afterNextTagOffsetLeft = nextTag.offsetLeft + nextTag.offsetWidth;
|
|
8081
|
+
const beforePrevTagOffsetLeft = prevTag.offsetLeft;
|
|
8082
|
+
if (afterNextTagOffsetLeft > unref(scrollLeftNumber) + wrap$.offsetWidth) {
|
|
8083
|
+
const { start } = useScrollTo({
|
|
8084
|
+
el: wrap$,
|
|
8085
|
+
position: "scrollLeft",
|
|
8086
|
+
to: afterNextTagOffsetLeft - wrap$.offsetWidth,
|
|
8087
|
+
duration: 500
|
|
8088
|
+
});
|
|
8089
|
+
start();
|
|
8090
|
+
} else if (beforePrevTagOffsetLeft < unref(scrollLeftNumber)) {
|
|
8091
|
+
const { start } = useScrollTo({
|
|
8092
|
+
el: wrap$,
|
|
8093
|
+
position: "scrollLeft",
|
|
8094
|
+
to: beforePrevTagOffsetLeft,
|
|
8095
|
+
duration: 500
|
|
8096
|
+
});
|
|
8097
|
+
start();
|
|
8098
|
+
}
|
|
8099
|
+
}
|
|
8100
|
+
};
|
|
8101
|
+
const isActive = (route) => {
|
|
8102
|
+
return route.fullPath === unref(currentRoute).fullPath;
|
|
8103
|
+
};
|
|
8104
|
+
const itemRefs = useTemplateRefsList();
|
|
8105
|
+
const visibleChange = (visible, tagItem) => {
|
|
8106
|
+
};
|
|
8107
|
+
const scrollbarRef = ref();
|
|
8108
|
+
const scrollLeftNumber = ref(0);
|
|
8109
|
+
const scroll = ({ scrollLeft }) => {
|
|
8110
|
+
scrollLeftNumber.value = scrollLeft;
|
|
8111
|
+
};
|
|
8112
|
+
onBeforeMount(() => {
|
|
8113
|
+
initTags();
|
|
8114
|
+
addTags();
|
|
8115
|
+
});
|
|
8116
|
+
watch(
|
|
8117
|
+
() => currentRoute.value,
|
|
8118
|
+
() => {
|
|
8119
|
+
addTags();
|
|
8120
|
+
moveToCurrentTag();
|
|
8121
|
+
}
|
|
8122
|
+
);
|
|
8123
|
+
return (_ctx, _cache) => {
|
|
8124
|
+
const _component_Icon = resolveComponent("Icon");
|
|
8125
|
+
const _component_router_link = resolveComponent("router-link");
|
|
8126
|
+
const _component_ElScrollbar = resolveComponent("ElScrollbar");
|
|
8127
|
+
return openBlock(), createElementBlock("div", {
|
|
8128
|
+
id: unref(prefixCls2),
|
|
8129
|
+
class: normalizeClass([unref(prefixCls2), "relative w-full flex bg-[#dbe4f880]"])
|
|
8130
|
+
}, [
|
|
8131
|
+
createElementVNode("div", _hoisted_2$b, [
|
|
8132
|
+
createVNode(_component_ElScrollbar, {
|
|
8133
|
+
ref_key: "scrollbarRef",
|
|
8134
|
+
ref: scrollbarRef,
|
|
8135
|
+
class: "h-full",
|
|
8136
|
+
onScroll: scroll
|
|
8137
|
+
}, {
|
|
8138
|
+
default: withCtx(() => [
|
|
8139
|
+
createElementVNode("div", _hoisted_3$a, [
|
|
8140
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(visitedViews), (item) => {
|
|
8141
|
+
var _a2, _b, _c, _d, _e, _f;
|
|
8142
|
+
return openBlock(), createBlock(unref(_sfc_main$u), {
|
|
8143
|
+
key: item.fullPath,
|
|
8144
|
+
ref_for: true,
|
|
8145
|
+
ref: unref(itemRefs).set,
|
|
8146
|
+
class: normalizeClass([
|
|
8147
|
+
`${unref(prefixCls2)}__item`,
|
|
8148
|
+
{
|
|
8149
|
+
"is-active": isActive(item)
|
|
8150
|
+
}
|
|
8151
|
+
]),
|
|
8152
|
+
schema: [
|
|
8153
|
+
{
|
|
8154
|
+
label: unref(t2)("common.reload"),
|
|
8155
|
+
disabled: ((_a2 = unref(selectedTag)) == null ? void 0 : _a2.fullPath) !== item.fullPath,
|
|
8156
|
+
command: () => {
|
|
8157
|
+
refreshSelectedTag(item);
|
|
8158
|
+
}
|
|
8159
|
+
},
|
|
8160
|
+
{
|
|
8161
|
+
label: unref(t2)("common.closeTab"),
|
|
8162
|
+
disabled: !!((_b = unref(visitedViews)) == null ? void 0 : _b.length) && ((_c = unref(selectedTag)) == null ? void 0 : _c.meta.affix) || ((_d = unref(visitedViews)) == null ? void 0 : _d.length) === 1,
|
|
8163
|
+
command: () => {
|
|
8164
|
+
closeSelectedTag(item);
|
|
8165
|
+
}
|
|
8166
|
+
},
|
|
8167
|
+
{
|
|
8168
|
+
label: unref(t2)("common.closeOther"),
|
|
8169
|
+
disabled: ((_e = unref(selectedTag)) == null ? void 0 : _e.fullPath) !== item.fullPath,
|
|
8170
|
+
command: () => {
|
|
8171
|
+
closeOthersTags();
|
|
8172
|
+
}
|
|
8173
|
+
},
|
|
8174
|
+
{
|
|
8175
|
+
label: unref(t2)("common.closeAll"),
|
|
8176
|
+
disabled: ((_f = unref(visitedViews)) == null ? void 0 : _f.length) === 1,
|
|
8177
|
+
command: () => {
|
|
8178
|
+
closeAllTags();
|
|
8179
|
+
}
|
|
8180
|
+
}
|
|
8181
|
+
],
|
|
8182
|
+
"tag-item": item,
|
|
8183
|
+
onVisibleChange: visibleChange
|
|
8184
|
+
}, {
|
|
8185
|
+
default: withCtx(() => [
|
|
8186
|
+
createElementVNode("div", {
|
|
8187
|
+
class: normalizeClass(`${unref(prefixCls2)}__item--wrap`)
|
|
8188
|
+
}, [
|
|
8189
|
+
createVNode(_component_router_link, {
|
|
8190
|
+
ref_for: true,
|
|
8191
|
+
ref: unref(tagLinksRefs).set,
|
|
8192
|
+
to: { ...item },
|
|
8193
|
+
custom: ""
|
|
8194
|
+
}, {
|
|
8195
|
+
default: withCtx(({ navigate }) => {
|
|
8196
|
+
var _a3, _b2;
|
|
8197
|
+
return [
|
|
8198
|
+
createElementVNode("div", {
|
|
8199
|
+
class: normalizeClass(`h-full flex items-center justify-center gap-8px whitespace-nowrap ${unref(prefixCls2)}__item--label`),
|
|
8200
|
+
onClick: navigate
|
|
8201
|
+
}, [
|
|
8202
|
+
createElementVNode("span", null, toDisplayString(unref(t2)((_a3 = item == null ? void 0 : item.meta) == null ? void 0 : _a3.title)), 1),
|
|
8203
|
+
((_b2 = unref(visitedViews)) == null ? void 0 : _b2.length) > 1 ? (openBlock(), createBlock(_component_Icon, {
|
|
8204
|
+
key: 0,
|
|
8205
|
+
class: normalizeClass(`${unref(prefixCls2)}__item--close`),
|
|
8206
|
+
size: 8,
|
|
8207
|
+
color: isActive(item) ? "#444444ff" : "#7b7e904ff",
|
|
8208
|
+
icon: "svg-icon:tag-close",
|
|
8209
|
+
onClick: withModifiers(($event) => closeSelectedTag(item), ["prevent", "stop"])
|
|
8210
|
+
}, null, 8, ["class", "color", "onClick"])) : createCommentVNode("", true)
|
|
8211
|
+
], 10, _hoisted_4$8)
|
|
8212
|
+
];
|
|
8213
|
+
}),
|
|
8214
|
+
_: 2
|
|
8215
|
+
}, 1032, ["to"])
|
|
8216
|
+
], 2)
|
|
8217
|
+
]),
|
|
8218
|
+
_: 2
|
|
8219
|
+
}, 1032, ["class", "schema", "tag-item"]);
|
|
8220
|
+
}), 128))
|
|
8221
|
+
])
|
|
8222
|
+
]),
|
|
8223
|
+
_: 1
|
|
8224
|
+
}, 512)
|
|
8225
|
+
])
|
|
8226
|
+
], 10, _hoisted_1$d);
|
|
8227
|
+
};
|
|
8228
|
+
}
|
|
8229
|
+
});
|
|
8230
|
+
const TagsView = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-6f94bff4"]]);
|
|
8231
|
+
const _sfc_main$s = /* @__PURE__ */ Object.assign({ name: "MenuTrigger" }, {
|
|
8232
|
+
__name: "MenuTrigger",
|
|
8233
|
+
props: {
|
|
8234
|
+
active: {
|
|
8235
|
+
type: Boolean,
|
|
8236
|
+
default: false
|
|
8237
|
+
}
|
|
8238
|
+
},
|
|
8239
|
+
emits: ["click", "toggle"],
|
|
8240
|
+
setup(__props, { emit: __emit }) {
|
|
8241
|
+
const { getPrefixCls: getPrefixCls2 } = useDesign();
|
|
8242
|
+
const prefixCls2 = getPrefixCls2("menu-trigger");
|
|
8243
|
+
const props = __props;
|
|
8244
|
+
const emit = __emit;
|
|
8245
|
+
const handleClick = () => {
|
|
8246
|
+
emit("click");
|
|
8247
|
+
emit("toggle", !props.active);
|
|
8248
|
+
};
|
|
8249
|
+
return (_ctx, _cache) => {
|
|
8250
|
+
const _component_Icon = resolveComponent("Icon");
|
|
8251
|
+
return openBlock(), createElementBlock("div", {
|
|
8252
|
+
class: normalizeClass([unref(prefixCls2), "flex items-center justify-center cursor-pointer", { "is-active": props.active }]),
|
|
8253
|
+
onClick: handleClick
|
|
8254
|
+
}, [
|
|
8255
|
+
createVNode(_component_Icon, {
|
|
8256
|
+
icon: props.active ? "ant-design:close-outlined" : "svg-icon:menu-trigger",
|
|
8257
|
+
svgClass: "!w-full !h-full",
|
|
8258
|
+
class: normalizeClass(["!w-18px", "!h-18px", "icon-color"])
|
|
8259
|
+
}, null, 8, ["icon"])
|
|
8260
|
+
], 2);
|
|
8261
|
+
};
|
|
8262
|
+
}
|
|
8263
|
+
});
|
|
8264
|
+
const MenuTrigger = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-f7f5d176"]]);
|
|
8265
|
+
const _hoisted_1$c = { class: "sidebar-inner" };
|
|
8266
|
+
const _hoisted_2$a = ["onClick"];
|
|
8267
|
+
const _hoisted_3$9 = ["onClick"];
|
|
8268
|
+
const _hoisted_4$7 = ["onClick"];
|
|
8269
|
+
const _sfc_main$r = /* @__PURE__ */ Object.assign({ name: "ProductServicePanel" }, {
|
|
8270
|
+
__name: "ProductServicePanel",
|
|
8271
|
+
props: {
|
|
8272
|
+
visible: {
|
|
8273
|
+
type: Boolean,
|
|
8274
|
+
default: false
|
|
8275
|
+
}
|
|
8276
|
+
},
|
|
8277
|
+
emits: ["update:visible", "select"],
|
|
8278
|
+
setup(__props, { emit: __emit }) {
|
|
8279
|
+
const { getPrefixCls: getPrefixCls2 } = useDesign();
|
|
8280
|
+
const prefixCls2 = getPrefixCls2("product-service-panel");
|
|
8281
|
+
const { t: t2 } = useI18n("layout");
|
|
8282
|
+
const props = __props;
|
|
8283
|
+
const emit = __emit;
|
|
8284
|
+
const router = useRouter();
|
|
8285
|
+
const permissionStore = usePermissionStore();
|
|
8286
|
+
const searchKeyword = ref("");
|
|
8287
|
+
const activeCategory = ref(0);
|
|
8288
|
+
const routers = computed(() => permissionStore.getRoleRouters);
|
|
8289
|
+
const filteredMenus = computed(() => {
|
|
8290
|
+
const keyword = searchKeyword.value.toLowerCase().trim();
|
|
8291
|
+
const filterHiddenMenus = (items) => {
|
|
8292
|
+
if (!items || !Array.isArray(items))
|
|
8293
|
+
return [];
|
|
8294
|
+
return items.filter((item) => !!item.visible).map((item) => ({
|
|
8295
|
+
...item,
|
|
8296
|
+
children: item.children ? filterHiddenMenus(item.children) : []
|
|
8297
|
+
}));
|
|
8298
|
+
};
|
|
8299
|
+
const baseMenus = filterHiddenMenus(routers.value);
|
|
8300
|
+
if (!keyword) {
|
|
8301
|
+
return baseMenus;
|
|
8302
|
+
}
|
|
8303
|
+
const filterFn = (items) => {
|
|
8304
|
+
return items.reduce((result, item) => {
|
|
8305
|
+
var _a2;
|
|
8306
|
+
const title = ((_a2 = item.meta) == null ? void 0 : _a2.title) || "";
|
|
8307
|
+
const isMatch = title.toLowerCase().includes(keyword);
|
|
8308
|
+
const children = item.children ? filterFn(item.children) : [];
|
|
8309
|
+
if (isMatch || children.length > 0) {
|
|
8310
|
+
result.push({
|
|
8311
|
+
...item,
|
|
8312
|
+
children: children.length > 0 ? children : item.children
|
|
8313
|
+
});
|
|
8314
|
+
}
|
|
8315
|
+
return result;
|
|
8316
|
+
}, []);
|
|
8317
|
+
};
|
|
8318
|
+
return filterFn(baseMenus);
|
|
8319
|
+
});
|
|
8320
|
+
const groupedMenus = computed(() => {
|
|
8321
|
+
return filteredMenus.value.map((menu) => {
|
|
8322
|
+
var _a2, _b;
|
|
8323
|
+
return {
|
|
8324
|
+
id: menu.id,
|
|
8325
|
+
title: ((_a2 = menu.meta) == null ? void 0 : _a2.title) || menu.name,
|
|
8326
|
+
icon: (_b = menu.meta) == null ? void 0 : _b.icon,
|
|
8327
|
+
path: menu.path,
|
|
8328
|
+
modulePath: menu.modulePath,
|
|
8329
|
+
children: (menu.children || []).filter((item) => {
|
|
8330
|
+
var _a3;
|
|
8331
|
+
return !((_a3 = item.meta) == null ? void 0 : _a3.hidden);
|
|
8332
|
+
})
|
|
8333
|
+
};
|
|
8334
|
+
});
|
|
8335
|
+
});
|
|
8336
|
+
const currentCategoryMenus = computed(() => {
|
|
8337
|
+
if (groupedMenus.value.length === 0)
|
|
8338
|
+
return [];
|
|
8339
|
+
const group = groupedMenus.value[activeCategory.value];
|
|
8340
|
+
return (group == null ? void 0 : group.children) || [];
|
|
8341
|
+
});
|
|
8342
|
+
const joinPath = (...paths) => {
|
|
8343
|
+
return paths.filter(Boolean).reduce((result, path) => {
|
|
8344
|
+
if (!result)
|
|
8345
|
+
return path;
|
|
8346
|
+
const normalizedBase = result.endsWith("/") ? result.slice(0, -1) : result;
|
|
8347
|
+
const normalizedPath = path.startsWith("/") ? path.slice(1) : path;
|
|
8348
|
+
return `${normalizedBase}/${normalizedPath}`;
|
|
8349
|
+
}, "");
|
|
8350
|
+
};
|
|
8351
|
+
const getAccessiblePath = (item, parentPath = "") => {
|
|
8352
|
+
const fullPath = joinPath(parentPath, item.path);
|
|
8353
|
+
if (item.children && item.children.length > 0) {
|
|
8354
|
+
const visibleChildren = item.children.filter((child) => {
|
|
8355
|
+
var _a2;
|
|
8356
|
+
return !((_a2 = child.meta) == null ? void 0 : _a2.hidden);
|
|
8357
|
+
});
|
|
8358
|
+
if (visibleChildren.length > 0) {
|
|
8359
|
+
return getAccessiblePath(visibleChildren[0], fullPath);
|
|
8360
|
+
}
|
|
8361
|
+
}
|
|
8362
|
+
return fullPath;
|
|
8363
|
+
};
|
|
8364
|
+
const closePanel = () => {
|
|
8365
|
+
emit("update:visible", false);
|
|
8366
|
+
searchKeyword.value = "";
|
|
8367
|
+
activeCategory.value = 0;
|
|
8368
|
+
};
|
|
8369
|
+
const handleSelect = (item, parentPath = "") => {
|
|
8370
|
+
var _a2, _b;
|
|
8371
|
+
const fullPath = getAccessiblePath(item, parentPath);
|
|
8372
|
+
if (fullPath) {
|
|
8373
|
+
const currentModuleId = permissionStore.getModuleId;
|
|
8374
|
+
const selectedModuleId = (_a2 = groupedMenus.value[activeCategory.value]) == null ? void 0 : _a2.id;
|
|
8375
|
+
if (selectedModuleId === currentModuleId) {
|
|
8376
|
+
router.push(fullPath.startsWith("/") ? fullPath : `/${fullPath}`);
|
|
8377
|
+
} else {
|
|
8378
|
+
const currentOrigin = window.location.origin;
|
|
8379
|
+
const modulePath = ((_b = groupedMenus.value[activeCategory.value]) == null ? void 0 : _b.modulePath) || "";
|
|
8380
|
+
const moduleFullPath = joinPath(modulePath, fullPath);
|
|
8381
|
+
const targetUrl = `${currentOrigin}${moduleFullPath.startsWith("/") ? moduleFullPath : `/${moduleFullPath}`}`;
|
|
8382
|
+
window.location.href = targetUrl;
|
|
8383
|
+
}
|
|
8384
|
+
closePanel();
|
|
8385
|
+
}
|
|
8386
|
+
};
|
|
8387
|
+
const handleCategorySelect = (index) => {
|
|
8388
|
+
activeCategory.value = index;
|
|
8389
|
+
};
|
|
8390
|
+
watch(() => props.visible, (val) => {
|
|
8391
|
+
if (val) {
|
|
8392
|
+
searchKeyword.value = "";
|
|
8393
|
+
activeCategory.value = 0;
|
|
8394
|
+
}
|
|
8395
|
+
});
|
|
8396
|
+
return (_ctx, _cache) => {
|
|
8397
|
+
return openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
8398
|
+
createVNode(Transition, { name: "fade" }, {
|
|
8399
|
+
default: withCtx(() => [
|
|
8400
|
+
__props.visible ? (openBlock(), createElementBlock("div", {
|
|
8401
|
+
key: 0,
|
|
8402
|
+
class: normalizeClass([unref(prefixCls2) + "__overlay"]),
|
|
8403
|
+
onClick: closePanel
|
|
8404
|
+
}, [
|
|
8405
|
+
createVNode(Transition, { name: "slide-down" }, {
|
|
8406
|
+
default: withCtx(() => [
|
|
8407
|
+
__props.visible ? (openBlock(), createElementBlock("div", {
|
|
8408
|
+
key: 0,
|
|
8409
|
+
class: normalizeClass([unref(prefixCls2)]),
|
|
8410
|
+
onClick: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
8411
|
+
}, ["stop"]))
|
|
8412
|
+
}, [
|
|
8413
|
+
createElementVNode("div", {
|
|
8414
|
+
class: normalizeClass([unref(prefixCls2) + "__body"])
|
|
8415
|
+
}, [
|
|
8416
|
+
createElementVNode("div", {
|
|
8417
|
+
class: normalizeClass([unref(prefixCls2) + "__sidebar"])
|
|
8418
|
+
}, [
|
|
8419
|
+
createElementVNode("div", {
|
|
8420
|
+
class: normalizeClass([unref(prefixCls2) + "__sidebar-title"])
|
|
8421
|
+
}, [
|
|
8422
|
+
createElementVNode("span", null, toDisplayString(unref(t2)("common.allProducts")), 1)
|
|
8423
|
+
], 2),
|
|
8424
|
+
createVNode(unref(ElScrollbar), null, {
|
|
8425
|
+
default: withCtx(() => [
|
|
8426
|
+
createElementVNode("div", _hoisted_1$c, [
|
|
8427
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(groupedMenus.value, (group, index) => {
|
|
8428
|
+
return openBlock(), createElementBlock("div", {
|
|
8429
|
+
key: index,
|
|
8430
|
+
class: normalizeClass([
|
|
8431
|
+
unref(prefixCls2) + "__category",
|
|
8432
|
+
{ "is-active": activeCategory.value === index }
|
|
8433
|
+
]),
|
|
8434
|
+
onClick: ($event) => handleCategorySelect(index)
|
|
8435
|
+
}, [
|
|
8436
|
+
createElementVNode("span", null, toDisplayString(group.title), 1)
|
|
8437
|
+
], 10, _hoisted_2$a);
|
|
8438
|
+
}), 128))
|
|
8439
|
+
])
|
|
8440
|
+
]),
|
|
8441
|
+
_: 1
|
|
8442
|
+
})
|
|
8443
|
+
], 2),
|
|
8444
|
+
createElementVNode("div", {
|
|
8445
|
+
class: normalizeClass([unref(prefixCls2) + "__content"])
|
|
8446
|
+
}, [
|
|
8447
|
+
createElementVNode("div", {
|
|
8448
|
+
class: normalizeClass([unref(prefixCls2) + "__header"])
|
|
8449
|
+
}, [
|
|
8450
|
+
createVNode(unref(ElInput), {
|
|
8451
|
+
modelValue: searchKeyword.value,
|
|
8452
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchKeyword.value = $event),
|
|
8453
|
+
placeholder: unref(t2)("common.searchMenu"),
|
|
8454
|
+
clearable: "",
|
|
8455
|
+
size: "default"
|
|
8456
|
+
}, {
|
|
8457
|
+
prefix: withCtx(() => [
|
|
8458
|
+
createVNode(unref(_sfc_main$x), {
|
|
8459
|
+
icon: "ep:search",
|
|
8460
|
+
size: 16
|
|
8461
|
+
})
|
|
8462
|
+
]),
|
|
8463
|
+
_: 1
|
|
8464
|
+
}, 8, ["modelValue", "placeholder"]),
|
|
8465
|
+
createElementVNode("div", {
|
|
8466
|
+
class: normalizeClass([unref(prefixCls2) + "__close"]),
|
|
8467
|
+
onClick: closePanel
|
|
8468
|
+
}, [
|
|
8469
|
+
createVNode(unref(_sfc_main$x), {
|
|
8470
|
+
icon: "ep:close",
|
|
8471
|
+
size: 18
|
|
8472
|
+
})
|
|
8473
|
+
], 2)
|
|
8474
|
+
], 2),
|
|
8475
|
+
createVNode(unref(ElScrollbar), null, {
|
|
8476
|
+
default: withCtx(() => [
|
|
8477
|
+
createElementVNode("div", {
|
|
8478
|
+
class: normalizeClass([unref(prefixCls2) + "__grid-container"])
|
|
8479
|
+
}, [
|
|
8480
|
+
currentCategoryMenus.value.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(currentCategoryMenus.value, (secondMenu, index) => {
|
|
8481
|
+
var _a2, _b;
|
|
8482
|
+
return openBlock(), createElementBlock("div", {
|
|
8483
|
+
key: index,
|
|
8484
|
+
class: normalizeClass([unref(prefixCls2) + "__column"])
|
|
8485
|
+
}, [
|
|
8486
|
+
createElementVNode("div", {
|
|
8487
|
+
class: normalizeClass([unref(prefixCls2) + "__column-title"])
|
|
8488
|
+
}, [
|
|
8489
|
+
createElementVNode("span", null, toDisplayString(((_a2 = secondMenu.meta) == null ? void 0 : _a2.title) || secondMenu.name), 1)
|
|
8490
|
+
], 2),
|
|
8491
|
+
createElementVNode("div", {
|
|
8492
|
+
class: normalizeClass([unref(prefixCls2) + "__column-list"])
|
|
8493
|
+
}, [
|
|
8494
|
+
secondMenu.children && secondMenu.children.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(secondMenu.children.filter((c) => {
|
|
8495
|
+
var _a3;
|
|
8496
|
+
return !((_a3 = c.meta) == null ? void 0 : _a3.hidden);
|
|
8497
|
+
}), (thirdMenu) => {
|
|
8498
|
+
var _a3;
|
|
8499
|
+
return openBlock(), createElementBlock("div", {
|
|
8500
|
+
key: thirdMenu.path,
|
|
8501
|
+
class: normalizeClass([unref(prefixCls2) + "__column-item"]),
|
|
8502
|
+
onClick: ($event) => {
|
|
8503
|
+
var _a4;
|
|
8504
|
+
return handleSelect(thirdMenu, joinPath((_a4 = groupedMenus.value[activeCategory.value]) == null ? void 0 : _a4.path, secondMenu.path));
|
|
8505
|
+
}
|
|
8506
|
+
}, [
|
|
8507
|
+
createElementVNode("span", null, toDisplayString(((_a3 = thirdMenu.meta) == null ? void 0 : _a3.title) || thirdMenu.name), 1)
|
|
8508
|
+
], 10, _hoisted_3$9);
|
|
8509
|
+
}), 128)) : (openBlock(), createElementBlock("div", {
|
|
8510
|
+
key: 1,
|
|
8511
|
+
class: normalizeClass([
|
|
8512
|
+
unref(prefixCls2) + "__column-item",
|
|
8513
|
+
{ [unref(prefixCls2) + "__column-item--disabled"]: secondMenu.type === 1 }
|
|
8514
|
+
]),
|
|
8515
|
+
onClick: ($event) => {
|
|
8516
|
+
var _a3;
|
|
8517
|
+
return secondMenu.type === 2 && handleSelect(secondMenu, (_a3 = groupedMenus.value[activeCategory.value]) == null ? void 0 : _a3.path);
|
|
8518
|
+
}
|
|
8519
|
+
}, [
|
|
8520
|
+
createElementVNode("span", null, toDisplayString(secondMenu.type === 1 ? unref(t2)("common.noData") || "暂无" : ((_b = secondMenu.meta) == null ? void 0 : _b.title) || secondMenu.name), 1)
|
|
8521
|
+
], 10, _hoisted_4$7))
|
|
8522
|
+
], 2)
|
|
8523
|
+
], 2);
|
|
8524
|
+
}), 128)) : groupedMenus.value[activeCategory.value] ? (openBlock(), createElementBlock("div", {
|
|
8525
|
+
key: 1,
|
|
8526
|
+
class: normalizeClass([unref(prefixCls2) + "__column"])
|
|
8527
|
+
}, [
|
|
8528
|
+
createElementVNode("div", {
|
|
8529
|
+
class: normalizeClass([unref(prefixCls2) + "__column-list"])
|
|
8530
|
+
}, [
|
|
8531
|
+
createElementVNode("div", {
|
|
8532
|
+
class: normalizeClass([unref(prefixCls2) + "__column-item", unref(prefixCls2) + "__column-item--disabled"])
|
|
8533
|
+
}, [
|
|
8534
|
+
createElementVNode("span", null, toDisplayString(unref(t2)("common.noData") || "暂无"), 1)
|
|
8535
|
+
], 2)
|
|
8536
|
+
], 2)
|
|
8537
|
+
], 2)) : (openBlock(), createElementBlock("div", {
|
|
8538
|
+
key: 2,
|
|
8539
|
+
class: normalizeClass([unref(prefixCls2) + "__empty"])
|
|
8540
|
+
}, [
|
|
8541
|
+
createVNode(unref(_sfc_main$x), {
|
|
8542
|
+
icon: "ant-design:inbox-outlined",
|
|
8543
|
+
size: 48
|
|
8544
|
+
}),
|
|
8545
|
+
createElementVNode("span", null, toDisplayString(unref(t2)("common.noDataTitle")), 1)
|
|
8546
|
+
], 2))
|
|
8547
|
+
], 2)
|
|
8548
|
+
]),
|
|
8549
|
+
_: 1
|
|
8550
|
+
})
|
|
8551
|
+
], 2)
|
|
8552
|
+
], 2)
|
|
8553
|
+
], 2)) : createCommentVNode("", true)
|
|
8554
|
+
]),
|
|
8555
|
+
_: 1
|
|
8556
|
+
})
|
|
8557
|
+
], 2)) : createCommentVNode("", true)
|
|
8558
|
+
]),
|
|
8559
|
+
_: 1
|
|
8560
|
+
})
|
|
8561
|
+
]);
|
|
8562
|
+
};
|
|
8563
|
+
}
|
|
8564
|
+
});
|
|
8565
|
+
const ProductServicePanel = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-e90309ba"]]);
|
|
8566
|
+
const _sfc_main$q = /* @__PURE__ */ Object.assign({ name: "Logo" }, {
|
|
8567
|
+
__name: "Logo",
|
|
8568
|
+
emits: ["logo-click"],
|
|
8569
|
+
setup(__props, { emit: __emit }) {
|
|
8570
|
+
const emit = __emit;
|
|
8571
|
+
const { getPrefixCls: getPrefixCls2 } = useDesign();
|
|
8572
|
+
const prefixCls2 = getPrefixCls2("logo");
|
|
8573
|
+
const appStore = useAppStore();
|
|
8574
|
+
const title = computed(() => appStore.getTitle);
|
|
8575
|
+
const layout = computed(() => appStore.getLayout);
|
|
8576
|
+
const theme = computed(() => appStore.getTheme);
|
|
8577
|
+
const panelVisible = ref(false);
|
|
8578
|
+
const togglePanel = (isActive) => {
|
|
8579
|
+
panelVisible.value = isActive;
|
|
8580
|
+
};
|
|
8581
|
+
const fontColor = computed(() => {
|
|
8582
|
+
return theme.value === "whiteLight" ? "var(--el-color-primary)" : "#fff";
|
|
8583
|
+
});
|
|
8584
|
+
const handleClickLogo = () => {
|
|
8585
|
+
emit("logo-click");
|
|
8586
|
+
};
|
|
8587
|
+
return (_ctx, _cache) => {
|
|
8588
|
+
const _component_Icon = resolveComponent("Icon");
|
|
8589
|
+
return openBlock(), createElementBlock("div", null, [
|
|
8590
|
+
createElementVNode("div", {
|
|
8591
|
+
class: normalizeClass([
|
|
8592
|
+
unref(prefixCls2),
|
|
8593
|
+
`${unref(prefixCls2)}__Top`,
|
|
8594
|
+
"flex !h-[var(--top-tool-height)] items-center cursor-default relative decoration-none overflow-hidden"
|
|
8595
|
+
])
|
|
8596
|
+
}, [
|
|
8597
|
+
createVNode(unref(MenuTrigger), {
|
|
8598
|
+
class: "mr-12px",
|
|
8599
|
+
active: panelVisible.value,
|
|
8600
|
+
onToggle: togglePanel
|
|
8601
|
+
}, null, 8, ["active"]),
|
|
8602
|
+
createElementVNode("div", {
|
|
8603
|
+
class: "flex cursor-pointer",
|
|
8604
|
+
onClick: handleClickLogo
|
|
8605
|
+
}, [
|
|
8606
|
+
createVNode(_component_Icon, {
|
|
8607
|
+
icon: "svg-icon:logo",
|
|
8608
|
+
color: fontColor.value,
|
|
8609
|
+
svgClass: "!w-full !h-full",
|
|
8610
|
+
class: normalizeClass(["!w-[var(--logo-height)]", "!h-[var(--logo-height)]"])
|
|
8611
|
+
}, null, 8, ["color"]),
|
|
8612
|
+
createElementVNode("div", {
|
|
8613
|
+
class: normalizeClass([
|
|
8614
|
+
"ml-10px text-16px font-700",
|
|
8615
|
+
{
|
|
8616
|
+
"text-[var(--top-header-text-color)]": ["left", "top", "topLeft"].includes(layout.value)
|
|
8617
|
+
}
|
|
8618
|
+
]),
|
|
8619
|
+
style: normalizeStyle({ color: fontColor.value })
|
|
8620
|
+
}, toDisplayString(title.value), 7)
|
|
8621
|
+
])
|
|
8622
|
+
], 2),
|
|
8623
|
+
createVNode(unref(ProductServicePanel), {
|
|
8624
|
+
visible: panelVisible.value,
|
|
8625
|
+
"onUpdate:visible": _cache[0] || (_cache[0] = ($event) => panelVisible.value = $event)
|
|
8626
|
+
}, null, 8, ["visible"])
|
|
8627
|
+
]);
|
|
8628
|
+
};
|
|
8629
|
+
}
|
|
8630
|
+
});
|
|
8631
|
+
const _hoisted_1$b = { class: "w-full min-w-1000px" };
|
|
8632
|
+
const _sfc_main$p = /* @__PURE__ */ Object.assign({ name: "AppView" }, {
|
|
8633
|
+
__name: "AppView",
|
|
8634
|
+
setup(__props) {
|
|
8635
|
+
const tagsViewStore = useTagsViewStore();
|
|
8636
|
+
const getCaches = computed(() => {
|
|
8637
|
+
return tagsViewStore.getCachedViews;
|
|
7819
8638
|
});
|
|
7820
|
-
|
|
7821
|
-
|
|
7822
|
-
|
|
7823
|
-
|
|
7824
|
-
|
|
7825
|
-
|
|
7826
|
-
|
|
7827
|
-
|
|
7828
|
-
return
|
|
7829
|
-
|
|
7830
|
-
|
|
7831
|
-
|
|
7832
|
-
|
|
7833
|
-
|
|
7834
|
-
|
|
7835
|
-
|
|
7836
|
-
|
|
7837
|
-
|
|
7838
|
-
|
|
7839
|
-
|
|
7840
|
-
|
|
7841
|
-
key += JSEncryptRSAKey.wordwrap(this.getPublicBaseKeyB64()) + "\n";
|
|
7842
|
-
key += "-----END PUBLIC KEY-----";
|
|
7843
|
-
return key;
|
|
7844
|
-
};
|
|
7845
|
-
JSEncryptRSAKey.hasPublicKeyProperty = function(obj) {
|
|
7846
|
-
obj = obj || {};
|
|
7847
|
-
return obj.hasOwnProperty("n") && obj.hasOwnProperty("e");
|
|
7848
|
-
};
|
|
7849
|
-
JSEncryptRSAKey.hasPrivateKeyProperty = function(obj) {
|
|
7850
|
-
obj = obj || {};
|
|
7851
|
-
return obj.hasOwnProperty("n") && obj.hasOwnProperty("e") && obj.hasOwnProperty("d") && obj.hasOwnProperty("p") && obj.hasOwnProperty("q") && obj.hasOwnProperty("dmp1") && obj.hasOwnProperty("dmq1") && obj.hasOwnProperty("coeff");
|
|
7852
|
-
};
|
|
7853
|
-
JSEncryptRSAKey.prototype.parsePropertiesFrom = function(obj) {
|
|
7854
|
-
this.n = obj.n;
|
|
7855
|
-
this.e = obj.e;
|
|
7856
|
-
if (obj.hasOwnProperty("d")) {
|
|
7857
|
-
this.d = obj.d;
|
|
7858
|
-
this.p = obj.p;
|
|
7859
|
-
this.q = obj.q;
|
|
7860
|
-
this.dmp1 = obj.dmp1;
|
|
7861
|
-
this.dmq1 = obj.dmq1;
|
|
7862
|
-
this.coeff = obj.coeff;
|
|
7863
|
-
}
|
|
7864
|
-
};
|
|
7865
|
-
return JSEncryptRSAKey;
|
|
7866
|
-
})(RSAKey);
|
|
7867
|
-
var _a;
|
|
7868
|
-
typeof process !== "undefined" ? (_a = process.env) === null || _a === void 0 ? void 0 : _a.npm_package_version : void 0;
|
|
7869
|
-
const { wsCache: wsCache$2 } = useCache();
|
|
7870
|
-
const AccessTokenKey = "ACCESS_TOKEN";
|
|
7871
|
-
const RefreshTokenKey = "REFRESH_TOKEN";
|
|
7872
|
-
const removeToken = () => {
|
|
7873
|
-
wsCache$2.delete(AccessTokenKey);
|
|
7874
|
-
wsCache$2.delete(RefreshTokenKey);
|
|
7875
|
-
};
|
|
7876
|
-
const { wsCache: wsCache$1 } = useCache();
|
|
7877
|
-
const useUserStore = defineStore("layout-user", {
|
|
7878
|
-
state: () => ({
|
|
7879
|
-
permissions: /* @__PURE__ */ new Set(),
|
|
7880
|
-
roles: [],
|
|
7881
|
-
isSetUser: false,
|
|
7882
|
-
user: {
|
|
7883
|
-
id: 0,
|
|
7884
|
-
avatar: "",
|
|
7885
|
-
nickname: "",
|
|
7886
|
-
deptId: 0,
|
|
7887
|
-
mobile: "",
|
|
7888
|
-
email: "",
|
|
7889
|
-
username: ""
|
|
7890
|
-
}
|
|
7891
|
-
}),
|
|
7892
|
-
getters: {
|
|
7893
|
-
getPermissions() {
|
|
7894
|
-
return this.permissions;
|
|
7895
|
-
},
|
|
7896
|
-
getRoles() {
|
|
7897
|
-
return this.roles;
|
|
7898
|
-
},
|
|
7899
|
-
getIsSetUser() {
|
|
7900
|
-
return this.isSetUser;
|
|
7901
|
-
},
|
|
7902
|
-
getUser() {
|
|
7903
|
-
return this.user;
|
|
7904
|
-
},
|
|
7905
|
-
getUserInfo() {
|
|
7906
|
-
const userInfo = wsCache$1.get(CACHE_KEY.USER);
|
|
7907
|
-
return userInfo;
|
|
7908
|
-
}
|
|
7909
|
-
},
|
|
7910
|
-
actions: {
|
|
7911
|
-
// 从缓存加载用户信息到state
|
|
7912
|
-
loadUserFromCacheAction(userInfo) {
|
|
7913
|
-
this.permissions = new Set(userInfo.permissions);
|
|
7914
|
-
this.roles = userInfo.roles;
|
|
7915
|
-
this.user = userInfo.user;
|
|
7916
|
-
this.isSetUser = true;
|
|
7917
|
-
wsCache$1.set(CACHE_KEY.USER, userInfo);
|
|
7918
|
-
wsCache$1.set(CACHE_KEY.ROLE_ROUTERS, userInfo.menus);
|
|
7919
|
-
},
|
|
7920
|
-
async setUserAvatarAction(avatar) {
|
|
7921
|
-
const userInfo = wsCache$1.get(CACHE_KEY.USER);
|
|
7922
|
-
this.user.avatar = avatar;
|
|
7923
|
-
userInfo.user.avatar = avatar;
|
|
7924
|
-
wsCache$1.set(CACHE_KEY.USER, userInfo);
|
|
7925
|
-
},
|
|
7926
|
-
async setUserNicknameAction(nickname) {
|
|
7927
|
-
const userInfo = wsCache$1.get(CACHE_KEY.USER);
|
|
7928
|
-
this.user.nickname = nickname;
|
|
7929
|
-
userInfo.user.nickname = nickname;
|
|
7930
|
-
wsCache$1.set(CACHE_KEY.USER, userInfo);
|
|
7931
|
-
},
|
|
7932
|
-
// 更新用户资料(昵称、手机号、邮箱)
|
|
7933
|
-
async updateUserProfileAction(user) {
|
|
7934
|
-
const userInfo = wsCache$1.get(CACHE_KEY.USER);
|
|
7935
|
-
this.user.nickname = user.nickname;
|
|
7936
|
-
this.user.mobile = user.mobile;
|
|
7937
|
-
this.user.email = user.email;
|
|
7938
|
-
userInfo.user.nickname = user.nickname;
|
|
7939
|
-
userInfo.user.mobile = user.mobile;
|
|
7940
|
-
userInfo.user.email = user.email;
|
|
7941
|
-
wsCache$1.set(CACHE_KEY.USER, userInfo);
|
|
7942
|
-
},
|
|
7943
|
-
async loginOut() {
|
|
7944
|
-
removeToken();
|
|
7945
|
-
deleteUserCache();
|
|
7946
|
-
this.resetState();
|
|
7947
|
-
},
|
|
7948
|
-
resetState() {
|
|
7949
|
-
this.permissions = /* @__PURE__ */ new Set();
|
|
7950
|
-
this.roles = [];
|
|
7951
|
-
this.isSetUser = false;
|
|
7952
|
-
this.user = {
|
|
7953
|
-
id: 0,
|
|
7954
|
-
avatar: "",
|
|
7955
|
-
nickname: "",
|
|
7956
|
-
deptId: 0
|
|
7957
|
-
};
|
|
7958
|
-
}
|
|
8639
|
+
const routerAlive = ref(true);
|
|
8640
|
+
const reload = () => {
|
|
8641
|
+
routerAlive.value = false;
|
|
8642
|
+
nextTick(() => routerAlive.value = true);
|
|
8643
|
+
};
|
|
8644
|
+
provide("reload", reload);
|
|
8645
|
+
return (_ctx, _cache) => {
|
|
8646
|
+
const _component_router_view = resolveComponent("router-view");
|
|
8647
|
+
return openBlock(), createElementBlock("section", _hoisted_1$b, [
|
|
8648
|
+
unref(routerAlive) ? (openBlock(), createBlock(_component_router_view, { key: 0 }, {
|
|
8649
|
+
default: withCtx(({ Component, route }) => [
|
|
8650
|
+
(openBlock(), createBlock(KeepAlive, { include: unref(getCaches) }, [
|
|
8651
|
+
(openBlock(), createBlock(resolveDynamicComponent(Component), {
|
|
8652
|
+
key: route.fullPath
|
|
8653
|
+
}))
|
|
8654
|
+
], 1032, ["include"]))
|
|
8655
|
+
]),
|
|
8656
|
+
_: 1
|
|
8657
|
+
})) : createCommentVNode("", true)
|
|
8658
|
+
]);
|
|
8659
|
+
};
|
|
7959
8660
|
}
|
|
7960
8661
|
});
|
|
7961
|
-
const
|
|
7962
|
-
return useUserStore(store);
|
|
7963
|
-
};
|
|
7964
|
-
const _sfc_main$p = /* @__PURE__ */ Object.assign({ name: "Message" }, {
|
|
8662
|
+
const _sfc_main$o = /* @__PURE__ */ Object.assign({ name: "Message" }, {
|
|
7965
8663
|
__name: "Message",
|
|
7966
8664
|
props: {
|
|
7967
8665
|
color: {
|
|
@@ -8015,39 +8713,7 @@ const _sfc_main$p = /* @__PURE__ */ Object.assign({ name: "Message" }, {
|
|
|
8015
8713
|
};
|
|
8016
8714
|
}
|
|
8017
8715
|
});
|
|
8018
|
-
const Message = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
8019
|
-
const _sfc_main$o = /* @__PURE__ */ Object.assign({ name: "Collapse" }, {
|
|
8020
|
-
__name: "Collapse",
|
|
8021
|
-
props: {
|
|
8022
|
-
color: {
|
|
8023
|
-
type: String,
|
|
8024
|
-
default: ""
|
|
8025
|
-
}
|
|
8026
|
-
},
|
|
8027
|
-
setup(__props) {
|
|
8028
|
-
const { getPrefixCls: getPrefixCls2 } = useDesign();
|
|
8029
|
-
const prefixCls2 = getPrefixCls2("collapse");
|
|
8030
|
-
const appStore = useAppStore();
|
|
8031
|
-
const collapse = computed(() => appStore.getCollapse);
|
|
8032
|
-
const toggleCollapse = () => {
|
|
8033
|
-
const collapsed = unref(collapse);
|
|
8034
|
-
appStore.setCollapse(!collapsed);
|
|
8035
|
-
};
|
|
8036
|
-
return (_ctx, _cache) => {
|
|
8037
|
-
const _component_Icon = resolveComponent("Icon");
|
|
8038
|
-
return openBlock(), createElementBlock("div", {
|
|
8039
|
-
class: normalizeClass(unref(prefixCls2)),
|
|
8040
|
-
onClick: toggleCollapse
|
|
8041
|
-
}, [
|
|
8042
|
-
createVNode(_component_Icon, {
|
|
8043
|
-
color: __props.color,
|
|
8044
|
-
icon: unref(collapse) ? "ant-design:menu-unfold-outlined" : "ant-design:menu-fold-outlined",
|
|
8045
|
-
class: "cursor-pointer"
|
|
8046
|
-
}, null, 8, ["color", "icon"])
|
|
8047
|
-
], 2);
|
|
8048
|
-
};
|
|
8049
|
-
}
|
|
8050
|
-
});
|
|
8716
|
+
const Message = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-5a726c1e"]]);
|
|
8051
8717
|
const avatarImg = "data:image/gif;base64,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";
|
|
8052
8718
|
const _hoisted_1$a = { class: "flex items-center text-[var(--top-header-text-color)] mr-18px" };
|
|
8053
8719
|
const _hoisted_2$9 = { class: "pl-5px text-14px <lg:hidden" };
|
|
@@ -8177,7 +8843,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
8177
8843
|
var _a2, _b;
|
|
8178
8844
|
return [(meta == null ? void 0 : meta.icon) && breadcrumbIcon.value ? createVNode("div", {
|
|
8179
8845
|
"class": "flex items-center"
|
|
8180
|
-
}, [createVNode(_sfc_main$
|
|
8846
|
+
}, [createVNode(_sfc_main$x, {
|
|
8181
8847
|
"icon": meta.icon,
|
|
8182
8848
|
"class": "mr-[2px]",
|
|
8183
8849
|
"svgClass": "inline-block"
|
|
@@ -8641,7 +9307,7 @@ const setI18nLanguage = (locale) => {
|
|
|
8641
9307
|
const useLocale = () => {
|
|
8642
9308
|
const changeLocale = async (locale) => {
|
|
8643
9309
|
const globalI18n = i18n.global;
|
|
8644
|
-
const langModule = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../../locales/en.js": () => import("./en-
|
|
9310
|
+
const langModule = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../../locales/en.js": () => import("./en-BXmz6NO1.mjs"), "../../locales/zh-CN.js": () => import("./zh-CN-CY7gEVUl.mjs") }), `../../locales/${locale}.js`);
|
|
8645
9311
|
globalI18n.setLocaleMessage(locale, langModule.default);
|
|
8646
9312
|
setI18nLanguage(locale);
|
|
8647
9313
|
};
|
|
@@ -8937,10 +9603,12 @@ const _sfc_main$h = /* @__PURE__ */ Object.assign({ name: "Setting" }, {
|
|
|
8937
9603
|
default: ""
|
|
8938
9604
|
}
|
|
8939
9605
|
},
|
|
8940
|
-
|
|
9606
|
+
emits: ["clear-cache-logout-click"],
|
|
9607
|
+
setup(__props, { emit: __emit }) {
|
|
9608
|
+
const emit = __emit;
|
|
8941
9609
|
const { t: t2 } = useI18n("layout");
|
|
8942
9610
|
const appStore = useAppStore();
|
|
8943
|
-
|
|
9611
|
+
useUserStore();
|
|
8944
9612
|
const { getPrefixCls: getPrefixCls2 } = useDesign();
|
|
8945
9613
|
const prefixCls2 = getPrefixCls2("setting");
|
|
8946
9614
|
const drawerCls = getPrefixCls2("setting-drawer");
|
|
@@ -8964,13 +9632,12 @@ const _sfc_main$h = /* @__PURE__ */ Object.assign({ name: "Setting" }, {
|
|
|
8964
9632
|
}
|
|
8965
9633
|
}
|
|
8966
9634
|
};
|
|
8967
|
-
const
|
|
9635
|
+
const clearCacheAndLogout = async () => {
|
|
8968
9636
|
await saveTheme({ theme: "whiteLight", layout: "left" });
|
|
8969
9637
|
const { wsCache: wsCache2 } = useCache();
|
|
8970
9638
|
wsCache2.delete(CACHE_KEY.THEME);
|
|
8971
9639
|
wsCache2.delete(CACHE_KEY.LAYOUT);
|
|
8972
|
-
|
|
8973
|
-
window.location.reload();
|
|
9640
|
+
emit("clear-cache-logout-click");
|
|
8974
9641
|
};
|
|
8975
9642
|
const themeChange = async (theme) => {
|
|
8976
9643
|
await saveTheme({ theme, layout: appStore.getLayout });
|
|
@@ -9009,13 +9676,14 @@ const _sfc_main$h = /* @__PURE__ */ Object.assign({ name: "Setting" }, {
|
|
|
9009
9676
|
size: "400px",
|
|
9010
9677
|
class: normalizeClass(unref(drawerCls)),
|
|
9011
9678
|
"modal-class": unref(overlayCls),
|
|
9012
|
-
"show-close": false
|
|
9679
|
+
"show-close": false,
|
|
9680
|
+
"append-to-body": ""
|
|
9013
9681
|
}, {
|
|
9014
9682
|
header: withCtx(() => [
|
|
9015
9683
|
createElementVNode("span", _hoisted_1$6, toDisplayString(unref(t2)("setting.projectSetting")), 1)
|
|
9016
9684
|
]),
|
|
9017
9685
|
footer: withCtx(() => [
|
|
9018
|
-
createVNode(unref(ElButton), { onClick:
|
|
9686
|
+
createVNode(unref(ElButton), { onClick: clearCacheAndLogout }, {
|
|
9019
9687
|
default: withCtx(() => _cache[2] || (_cache[2] = [
|
|
9020
9688
|
createTextVNode("清空缓存&退出登录", -1)
|
|
9021
9689
|
])),
|
|
@@ -9047,7 +9715,7 @@ const _sfc_main$h = /* @__PURE__ */ Object.assign({ name: "Setting" }, {
|
|
|
9047
9715
|
};
|
|
9048
9716
|
}
|
|
9049
9717
|
});
|
|
9050
|
-
const Setting = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-
|
|
9718
|
+
const Setting = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-d30fe3cf"]]);
|
|
9051
9719
|
const _sfc_main$g = {
|
|
9052
9720
|
__name: "index",
|
|
9053
9721
|
props: {
|
|
@@ -9194,6 +9862,10 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
9194
9862
|
onLogoutClick: {
|
|
9195
9863
|
type: Function,
|
|
9196
9864
|
default: null
|
|
9865
|
+
},
|
|
9866
|
+
onClearCacheLogoutClick: {
|
|
9867
|
+
type: Function,
|
|
9868
|
+
default: null
|
|
9197
9869
|
}
|
|
9198
9870
|
},
|
|
9199
9871
|
setup(props, {
|
|
@@ -9201,7 +9873,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
9201
9873
|
}) {
|
|
9202
9874
|
const appStore = useAppStore();
|
|
9203
9875
|
const breadcrumb = computed(() => appStore.getBreadcrumb);
|
|
9204
|
-
|
|
9876
|
+
computed(() => appStore.getHamburger);
|
|
9205
9877
|
const search = computed(() => appStore.search);
|
|
9206
9878
|
const layout = computed(() => appStore.getLayout);
|
|
9207
9879
|
const locale = computed(() => appStore.getLocale);
|
|
@@ -9214,10 +9886,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
9214
9886
|
"class": [prefixCls$2, "h-[var(--top-tool-height)] relative px-[var(--top-tool-p-x)] flex items-center justify-between", "dark:bg-[var(--el-bg-color)]"]
|
|
9215
9887
|
}, [layout.value !== "top" ? createVNode("div", {
|
|
9216
9888
|
"class": "h-full flex items-center"
|
|
9217
|
-
}, [
|
|
9218
|
-
"class": "custom-hover",
|
|
9219
|
-
"color": "var(--top-header-text-color)"
|
|
9220
|
-
}, null) : void 0, breadcrumb.value ? createVNode(Breadcrumb, {
|
|
9889
|
+
}, [breadcrumb.value ? createVNode(Breadcrumb, {
|
|
9221
9890
|
"class": "lt-md:hidden"
|
|
9222
9891
|
}, null) : void 0]) : void 0, (_a2 = slots.default) == null ? void 0 : _a2.call(slots), createVNode("div", {
|
|
9223
9892
|
"class": "h-full flex items-center"
|
|
@@ -9225,7 +9894,8 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
9225
9894
|
"isModal": false
|
|
9226
9895
|
}, null) : void 0, setting.value ? createVNode(Setting, {
|
|
9227
9896
|
"class": "custom-hover cursor-pointer",
|
|
9228
|
-
"color": "var(--top-header-text-color)"
|
|
9897
|
+
"color": "var(--top-header-text-color)",
|
|
9898
|
+
"onClearCacheLogoutClick": props.onClearCacheLogoutClick
|
|
9229
9899
|
}, null) : void 0, locale.value ? createVNode(_sfc_main$l, {
|
|
9230
9900
|
"class": "custom-hover",
|
|
9231
9901
|
"color": "var(--top-header-text-color)"
|
|
@@ -9239,16 +9909,17 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
9239
9909
|
};
|
|
9240
9910
|
}
|
|
9241
9911
|
});
|
|
9242
|
-
const ToolHeader = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-
|
|
9912
|
+
const ToolHeader = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-0b5dffd2"]]);
|
|
9243
9913
|
const {
|
|
9244
9914
|
getPrefixCls: getPrefixCls$1
|
|
9245
9915
|
} = useDesign();
|
|
9246
9916
|
const prefixCls$1 = getPrefixCls$1("layout");
|
|
9247
9917
|
const scrollRef = ref();
|
|
9248
|
-
const useRenderLayout = (onLogoClick, onMessageClick, onLogoutClick) => {
|
|
9918
|
+
const useRenderLayout = (onLogoClick, onMessageClick, onLogoutClick, onClearCacheLogoutClick) => {
|
|
9249
9919
|
const appStore = useAppStore();
|
|
9250
9920
|
const permissionStore = usePermissionStore();
|
|
9251
9921
|
const pageLoading = computed(() => appStore.getPageLoading);
|
|
9922
|
+
const tagsView = computed(() => appStore.getTagsView);
|
|
9252
9923
|
const collapse = computed(() => appStore.getCollapse);
|
|
9253
9924
|
const logo = computed(() => appStore.logo);
|
|
9254
9925
|
const leftMenuRouters = computed(() => permissionStore.getLeftMenuRouters);
|
|
@@ -9279,7 +9950,7 @@ const useRenderLayout = (onLogoClick, onMessageClick, onLogoutClick) => {
|
|
|
9279
9950
|
const renderLeft = () => {
|
|
9280
9951
|
return createVNode(Fragment, null, [createVNode("div", {
|
|
9281
9952
|
"class": ["relative flex items-center bg-[linear-gradient(var(--top-header-bg-color))] layout-border__bottom dark:bg-[var(--el-bg-color)] shadow-[0px_2px_6px_0px_rgba(197,206,225,0.35)]", festivalTopClass.value, zIndexClass.value]
|
|
9282
|
-
}, [logo.value ? createVNode(_sfc_main$
|
|
9953
|
+
}, [logo.value ? createVNode(_sfc_main$q, {
|
|
9283
9954
|
"class": [{
|
|
9284
9955
|
"w-[var(--left-menu-min-width)]": appStore.getCollapse,
|
|
9285
9956
|
"w-[var(--left-menu-max-width)]": !appStore.getCollapse
|
|
@@ -9288,7 +9959,8 @@ const useRenderLayout = (onLogoClick, onMessageClick, onLogoutClick) => {
|
|
|
9288
9959
|
}, null) : void 0, createVNode(ToolHeader, {
|
|
9289
9960
|
"class": "flex-1",
|
|
9290
9961
|
"onMessageClick": onMessageClick,
|
|
9291
|
-
"onLogoutClick": onLogoutClick
|
|
9962
|
+
"onLogoutClick": onLogoutClick,
|
|
9963
|
+
"onClearCacheLogoutClick": onClearCacheLogoutClick
|
|
9292
9964
|
}, null)]), createVNode("div", {
|
|
9293
9965
|
"class": "h-[calc(100%-var(--top-header-height))] w-full flex"
|
|
9294
9966
|
}, [createVNode(Menu, {
|
|
@@ -9300,36 +9972,54 @@ const useRenderLayout = (onLogoClick, onMessageClick, onLogoutClick) => {
|
|
|
9300
9972
|
}],
|
|
9301
9973
|
"style": "transition: all var(--transition-time-02);"
|
|
9302
9974
|
}, [withDirectives(createVNode(ElScrollbar, {
|
|
9303
|
-
"class": [`${prefixCls$1}-content-scrollbar
|
|
9975
|
+
"class": [`${prefixCls$1}-content-scrollbar`, {
|
|
9976
|
+
"!h-[calc(100%-var(--tags-view-height))] mt-[calc(var(--tags-view-height))]": tagsView.value
|
|
9977
|
+
}],
|
|
9304
9978
|
"ref": scrollRef
|
|
9305
9979
|
}, {
|
|
9306
|
-
default: () => [createVNode(
|
|
9980
|
+
default: () => [tagsView.value ? createVNode(TagsView, {
|
|
9981
|
+
"class": ["layout-border__bottom absolute", "!fixed top-0 left-0 z-10", {
|
|
9982
|
+
"w-[calc(100%-var(--left-menu-min-width))] !left-[var(--left-menu-min-width)] mt-[var(--top-header-height)]": collapse.value,
|
|
9983
|
+
"w-[calc(100%-var(--left-menu-max-width))] !left-[var(--left-menu-max-width)] mt-[var(--top-header-height)]": !collapse.value
|
|
9984
|
+
}],
|
|
9985
|
+
"style": "transition: width var(--transition-time-02), left var(--transition-time-02);"
|
|
9986
|
+
}, null) : void 0, createVNode(_sfc_main$p, null, null)]
|
|
9307
9987
|
}), [[resolveDirective("loading"), pageLoading.value]])])])]);
|
|
9308
9988
|
};
|
|
9309
9989
|
const renderTop = () => {
|
|
9310
9990
|
return createVNode(Fragment, null, [createVNode("div", {
|
|
9311
|
-
"class": ["relative flex items-center justify-between bg-[linear-gradient(var(--top-header-bg-color))]",
|
|
9312
|
-
|
|
9991
|
+
"class": ["relative flex items-center justify-between bg-[linear-gradient(var(--top-header-bg-color))]", {
|
|
9992
|
+
"layout-border__bottom": !tagsView.value
|
|
9993
|
+
}, festivalTopClass.value]
|
|
9994
|
+
}, [logo.value ? createVNode(_sfc_main$q, {
|
|
9313
9995
|
"class": ["w-[var(--left-menu-max-width)]"],
|
|
9314
9996
|
"onLogoClick": onLogoClick
|
|
9315
9997
|
}, null) : void 0, createVNode(Menu, {
|
|
9316
9998
|
"class": "h-[var(--top-tool-height)] flex-1 px-10px"
|
|
9317
9999
|
}, null), createVNode(ToolHeader, {
|
|
9318
10000
|
"onMessageClick": onMessageClick,
|
|
9319
|
-
"onLogoutClick": onLogoutClick
|
|
10001
|
+
"onLogoutClick": onLogoutClick,
|
|
10002
|
+
"onClearCacheLogoutClick": onClearCacheLogoutClick
|
|
9320
10003
|
}, null)]), createVNode("div", {
|
|
9321
10004
|
"class": [`${prefixCls$1}-content`, "w-full h-[calc(100%-var(--top-tool-height))]"]
|
|
9322
10005
|
}, [withDirectives(createVNode(ElScrollbar, {
|
|
9323
|
-
"class": [`${prefixCls$1}-content-scrollbar
|
|
10006
|
+
"class": [`${prefixCls$1}-content-scrollbar`, {
|
|
10007
|
+
"!h-[calc(100%-var(--tags-view-height))] mt-[calc(var(--tags-view-height))]": tagsView.value
|
|
10008
|
+
}],
|
|
9324
10009
|
"ref": scrollRef
|
|
9325
10010
|
}, {
|
|
9326
|
-
default: () => [createVNode(
|
|
10011
|
+
default: () => [tagsView.value ? createVNode(TagsView, {
|
|
10012
|
+
"class": ["layout-border__bottom layout-border__top relative", "!fixed w-full top-[var(--top-tool-height)] left-0"],
|
|
10013
|
+
"style": "transition: width var(--transition-time-02), left var(--transition-time-02);"
|
|
10014
|
+
}, null) : void 0, createVNode(_sfc_main$p, null, null)]
|
|
9327
10015
|
}), [[resolveDirective("loading"), pageLoading.value]])])]);
|
|
9328
10016
|
};
|
|
9329
10017
|
const renderTopLeft = () => {
|
|
9330
10018
|
return createVNode(Fragment, null, [createVNode("div", {
|
|
9331
|
-
"class": ["relative flex items-center justify-between bg-[linear-gradient(var(--top-header-bg-color))] shadow-[0px_2px_6px_0px_rgba(197,206,225,0.35)]",
|
|
9332
|
-
|
|
10019
|
+
"class": ["relative flex items-center justify-between bg-[linear-gradient(var(--top-header-bg-color))] shadow-[0px_2px_6px_0px_rgba(197,206,225,0.35)]", {
|
|
10020
|
+
"layout-border__bottom": !tagsView.value
|
|
10021
|
+
}, festivalTopClass.value, zIndexClass.value]
|
|
10022
|
+
}, [logo.value ? createVNode(_sfc_main$q, {
|
|
9333
10023
|
"class": [{
|
|
9334
10024
|
"w-[var(--left-menu-min-width)]": appStore.getCollapse,
|
|
9335
10025
|
"w-[var(--left-menu-max-width)]": !appStore.getCollapse
|
|
@@ -9338,7 +10028,8 @@ const useRenderLayout = (onLogoClick, onMessageClick, onLogoutClick) => {
|
|
|
9338
10028
|
}, null) : void 0, createVNode(ToolHeader, {
|
|
9339
10029
|
"class": "flex-1",
|
|
9340
10030
|
"onMessageClick": onMessageClick,
|
|
9341
|
-
"onLogoutClick": onLogoutClick
|
|
10031
|
+
"onLogoutClick": onLogoutClick,
|
|
10032
|
+
"onClearCacheLogoutClick": onClearCacheLogoutClick
|
|
9342
10033
|
}, {
|
|
9343
10034
|
default: () => createVNode(Menu, {
|
|
9344
10035
|
"mode": "horizontal",
|
|
@@ -9359,10 +10050,18 @@ const useRenderLayout = (onLogoClick, onMessageClick, onLogoutClick) => {
|
|
|
9359
10050
|
}],
|
|
9360
10051
|
"style": "transition: all var(--transition-time-02);"
|
|
9361
10052
|
}, [withDirectives(createVNode(ElScrollbar, {
|
|
9362
|
-
"class": [`${prefixCls$1}-content-scrollbar
|
|
10053
|
+
"class": [`${prefixCls$1}-content-scrollbar`, {
|
|
10054
|
+
"!h-[calc(100%-var(--tags-view-height))] mt-[calc(var(--tags-view-height))]": tagsView.value
|
|
10055
|
+
}],
|
|
9363
10056
|
"ref": scrollRef
|
|
9364
10057
|
}, {
|
|
9365
|
-
default: () => [createVNode(
|
|
10058
|
+
default: () => [tagsView.value ? createVNode(TagsView, {
|
|
10059
|
+
"class": ["layout-border__bottom absolute", "!fixed top-0 left-0 z-10", {
|
|
10060
|
+
"w-[calc(100%-var(--left-menu-min-width))] !left-[var(--left-menu-min-width)] mt-[var(--top-header-height)]": collapse.value,
|
|
10061
|
+
"w-[calc(100%-var(--left-menu-max-width))] !left-[var(--left-menu-max-width)] mt-[var(--top-header-height)]": !collapse.value
|
|
10062
|
+
}],
|
|
10063
|
+
"style": "transition: width var(--transition-time-02), left var(--transition-time-02);"
|
|
10064
|
+
}, null) : void 0, createVNode(_sfc_main$p, null, null)]
|
|
9366
10065
|
}), [[resolveDirective("loading"), pageLoading.value]])])])]);
|
|
9367
10066
|
};
|
|
9368
10067
|
return {
|
|
@@ -9377,13 +10076,13 @@ const {
|
|
|
9377
10076
|
} = useDesign();
|
|
9378
10077
|
const prefixCls = getPrefixCls("layout");
|
|
9379
10078
|
const layoutScrollRef = ref();
|
|
9380
|
-
const renderLayout = (layout, onLogoClick, onMessageClick, onLogoutClick) => {
|
|
10079
|
+
const renderLayout = (layout, onLogoClick, onMessageClick, onLogoutClick, onClearCacheLogoutClick) => {
|
|
9381
10080
|
const {
|
|
9382
10081
|
renderLeft,
|
|
9383
10082
|
renderTop,
|
|
9384
10083
|
renderTopLeft,
|
|
9385
10084
|
scrollRef: scrollRef2
|
|
9386
|
-
} = useRenderLayout(onLogoClick, onMessageClick, onLogoutClick);
|
|
10085
|
+
} = useRenderLayout(onLogoClick, onMessageClick, onLogoutClick, onClearCacheLogoutClick);
|
|
9387
10086
|
layoutScrollRef.value = scrollRef2.value;
|
|
9388
10087
|
switch (unref(layout)) {
|
|
9389
10088
|
case "left":
|
|
@@ -9396,7 +10095,7 @@ const renderLayout = (layout, onLogoClick, onMessageClick, onLogoutClick) => {
|
|
|
9396
10095
|
};
|
|
9397
10096
|
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
9398
10097
|
name: "Layout",
|
|
9399
|
-
emits: ["logo-click", "message-click", "logout-click"],
|
|
10098
|
+
emits: ["logo-click", "message-click", "logout-click", "clear-cache-logout-click"],
|
|
9400
10099
|
setup(props, {
|
|
9401
10100
|
emit
|
|
9402
10101
|
}) {
|
|
@@ -9413,12 +10112,15 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
9413
10112
|
const handleLogoutClick = () => {
|
|
9414
10113
|
emit("logout-click");
|
|
9415
10114
|
};
|
|
10115
|
+
const handleClearCacheLogoutClick = () => {
|
|
10116
|
+
emit("clear-cache-logout-click");
|
|
10117
|
+
};
|
|
9416
10118
|
return () => createVNode("section", {
|
|
9417
10119
|
"class": [prefixCls, `${prefixCls}__${layout.value}`, "w-[100%] h-[100%] relative", `${prefixCls}__${theme.value}`]
|
|
9418
|
-
}, [renderLayout(layout, handleLogoClick, handleMessageClick, handleLogoutClick), createVNode(_sfc_main$
|
|
10120
|
+
}, [renderLayout(layout, handleLogoClick, handleMessageClick, handleLogoutClick, handleClearCacheLogoutClick), createVNode(_sfc_main$y, null, null)]);
|
|
9419
10121
|
}
|
|
9420
10122
|
});
|
|
9421
|
-
const Layout = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-
|
|
10123
|
+
const Layout = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-0fb07176"]]);
|
|
9422
10124
|
const _sfc_main$d = {
|
|
9423
10125
|
__name: "ConfigGlobal",
|
|
9424
10126
|
props: {
|
|
@@ -10446,7 +11148,7 @@ const _sfc_main$4 = /* @__PURE__ */ Object.assign({ name: "Steps" }, {
|
|
|
10446
11148
|
createElementVNode("div", _hoisted_2$3, [
|
|
10447
11149
|
createElementVNode("div", _hoisted_3$3, [
|
|
10448
11150
|
createElementVNode("div", _hoisted_4$3, [
|
|
10449
|
-
__props.active > index ? (openBlock(), createBlock(unref(_sfc_main$
|
|
11151
|
+
__props.active > index ? (openBlock(), createBlock(unref(_sfc_main$x), {
|
|
10450
11152
|
key: 0,
|
|
10451
11153
|
icon: "ant-design:check-outlined",
|
|
10452
11154
|
color: "#fff"
|
|
@@ -10790,7 +11492,7 @@ const _sfc_main$2 = /* @__PURE__ */ Object.assign({ name: "UploadImg", inheritAt
|
|
|
10790
11492
|
class: "handle-icon",
|
|
10791
11493
|
onClick: _cache[0] || (_cache[0] = ($event) => imagePreview(__props.modelValue))
|
|
10792
11494
|
}, [
|
|
10793
|
-
createVNode(unref(_sfc_main$
|
|
11495
|
+
createVNode(unref(_sfc_main$x), { icon: "ant-design:zoom-in-outlined" }),
|
|
10794
11496
|
__props.showBtnText ? (openBlock(), createElementBlock("span", _hoisted_3$2, toDisplayString(unref(t2)("action.detail")), 1)) : createCommentVNode("", true)
|
|
10795
11497
|
]),
|
|
10796
11498
|
__props.showDelete && !__props.disabled ? (openBlock(), createElementBlock("div", {
|
|
@@ -10798,13 +11500,13 @@ const _sfc_main$2 = /* @__PURE__ */ Object.assign({ name: "UploadImg", inheritAt
|
|
|
10798
11500
|
class: "handle-icon",
|
|
10799
11501
|
onClick: deleteImg
|
|
10800
11502
|
}, [
|
|
10801
|
-
createVNode(unref(_sfc_main$
|
|
11503
|
+
createVNode(unref(_sfc_main$x), { icon: "ant-design:delete-outlined" }),
|
|
10802
11504
|
__props.showBtnText ? (openBlock(), createElementBlock("span", _hoisted_4$2, toDisplayString(unref(t2)("action.del")), 1)) : createCommentVNode("", true)
|
|
10803
11505
|
])) : createCommentVNode("", true)
|
|
10804
11506
|
])
|
|
10805
11507
|
], 64)) : (openBlock(), createElementBlock("div", _hoisted_5$2, [
|
|
10806
11508
|
renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
10807
|
-
createVNode(unref(_sfc_main$
|
|
11509
|
+
createVNode(unref(_sfc_main$x), {
|
|
10808
11510
|
icon: "ep:plus",
|
|
10809
11511
|
size: 20
|
|
10810
11512
|
}),
|
|
@@ -10901,9 +11603,9 @@ const _sfc_main$1 = /* @__PURE__ */ Object.assign({ name: "UploadImgs", inheritA
|
|
|
10901
11603
|
emits: ["update:modelValue"],
|
|
10902
11604
|
setup(__props, { emit: __emit }) {
|
|
10903
11605
|
useCssVars((_ctx) => ({
|
|
10904
|
-
"
|
|
10905
|
-
"
|
|
10906
|
-
"
|
|
11606
|
+
"7ab73d80": __props.borderradius,
|
|
11607
|
+
"07ec1644": __props.width,
|
|
11608
|
+
"48708f2e": __props.height
|
|
10907
11609
|
}));
|
|
10908
11610
|
const message = useMessage();
|
|
10909
11611
|
const imagePreview = (imgUrl) => {
|
|
@@ -11029,7 +11731,7 @@ const _sfc_main$1 = /* @__PURE__ */ Object.assign({ name: "UploadImgs", inheritA
|
|
|
11029
11731
|
class: "handle-icon",
|
|
11030
11732
|
onClick: ($event) => imagePreview(file.url)
|
|
11031
11733
|
}, [
|
|
11032
|
-
createVNode(unref(_sfc_main$
|
|
11734
|
+
createVNode(unref(_sfc_main$x), { icon: "ant-design:zoom-in-outlined" }),
|
|
11033
11735
|
__props.showBtnText ? (openBlock(), createElementBlock("span", _hoisted_5$1, "查看")) : createCommentVNode("", true)
|
|
11034
11736
|
], 8, _hoisted_4$1),
|
|
11035
11737
|
!__props.disabled ? (openBlock(), createElementBlock("div", {
|
|
@@ -11037,7 +11739,7 @@ const _sfc_main$1 = /* @__PURE__ */ Object.assign({ name: "UploadImgs", inheritA
|
|
|
11037
11739
|
class: "handle-icon",
|
|
11038
11740
|
onClick: ($event) => handleRemove(file)
|
|
11039
11741
|
}, [
|
|
11040
|
-
createVNode(unref(_sfc_main$
|
|
11742
|
+
createVNode(unref(_sfc_main$x), { icon: "ant-design:delete-outlined" }),
|
|
11041
11743
|
__props.showBtnText ? (openBlock(), createElementBlock("span", _hoisted_7, "删除")) : createCommentVNode("", true)
|
|
11042
11744
|
], 8, _hoisted_6)) : createCommentVNode("", true)
|
|
11043
11745
|
])
|
|
@@ -11045,7 +11747,7 @@ const _sfc_main$1 = /* @__PURE__ */ Object.assign({ name: "UploadImgs", inheritA
|
|
|
11045
11747
|
default: withCtx(() => [
|
|
11046
11748
|
createElementVNode("div", _hoisted_2$1, [
|
|
11047
11749
|
renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
11048
|
-
createVNode(unref(_sfc_main$
|
|
11750
|
+
createVNode(unref(_sfc_main$x), {
|
|
11049
11751
|
icon: "ep:plus",
|
|
11050
11752
|
size: 20
|
|
11051
11753
|
}),
|
|
@@ -11062,7 +11764,7 @@ const _sfc_main$1 = /* @__PURE__ */ Object.assign({ name: "UploadImgs", inheritA
|
|
|
11062
11764
|
};
|
|
11063
11765
|
}
|
|
11064
11766
|
});
|
|
11065
|
-
const UploadImgs = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
11767
|
+
const UploadImgs = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-eb21783b"]]);
|
|
11066
11768
|
const _hoisted_1 = { class: "mt-10px line-height-20px color-[var(--el-upload-tip-color)] text-12px" };
|
|
11067
11769
|
const _hoisted_2 = { class: "flex items-center" };
|
|
11068
11770
|
const _hoisted_3 = { class: "ml-10px" };
|
|
@@ -11286,7 +11988,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({ name: "UploadFile", inheritAtt
|
|
|
11286
11988
|
default: withCtx(() => [
|
|
11287
11989
|
createVNode(unref(ElButton), { type: "primary" }, {
|
|
11288
11990
|
default: withCtx(() => [
|
|
11289
|
-
createVNode(unref(_sfc_main$
|
|
11991
|
+
createVNode(unref(_sfc_main$x), { icon: "ant-design:upload-outlined" }),
|
|
11290
11992
|
_cache[1] || (_cache[1] = createTextVNode(" 选取文件 ", -1))
|
|
11291
11993
|
]),
|
|
11292
11994
|
_: 1,
|
|
@@ -11332,7 +12034,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({ name: "UploadFile", inheritAtt
|
|
|
11332
12034
|
};
|
|
11333
12035
|
}
|
|
11334
12036
|
});
|
|
11335
|
-
const UploadFile = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
12037
|
+
const UploadFile = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-9fa6e6bc"]]);
|
|
11336
12038
|
function useLayout() {
|
|
11337
12039
|
const collapsed = ref(false);
|
|
11338
12040
|
const toggleCollapsed = () => {
|
|
@@ -11348,14 +12050,14 @@ const install = (app) => {
|
|
|
11348
12050
|
app.component("BmpConfigGlobal", _sfc_main$d);
|
|
11349
12051
|
app.component("BmpPageCard", PageCard);
|
|
11350
12052
|
app.component("BmpPageNavBar", PageNavBar);
|
|
11351
|
-
app.component("BmpIcon", _sfc_main$
|
|
12053
|
+
app.component("BmpIcon", _sfc_main$x);
|
|
11352
12054
|
app.component("BmpBadge", _sfc_main$a);
|
|
11353
12055
|
app.component("BmpPagination", _sfc_main$9);
|
|
11354
12056
|
app.component("BmpDialog", _sfc_main$8);
|
|
11355
12057
|
app.component("BmpAlert", _sfc_main$7);
|
|
11356
12058
|
app.component("BmpAnchor", _sfc_main$5);
|
|
11357
12059
|
app.component("BmpSteps", Steps);
|
|
11358
|
-
app.component("BmpBacktop", _sfc_main$
|
|
12060
|
+
app.component("BmpBacktop", _sfc_main$y);
|
|
11359
12061
|
app.component("BmpUploadImg", UploadImg);
|
|
11360
12062
|
app.component("BmpUploadImgs", UploadImgs);
|
|
11361
12063
|
app.component("BmpUploadFile", UploadFile);
|
|
@@ -11474,7 +12176,7 @@ export {
|
|
|
11474
12176
|
ElAside2 as BmpAside,
|
|
11475
12177
|
ElAutocomplete2 as BmpAutocomplete,
|
|
11476
12178
|
ElAvatar2 as BmpAvatar,
|
|
11477
|
-
_sfc_main$
|
|
12179
|
+
_sfc_main$y as BmpBacktop,
|
|
11478
12180
|
ElBacktop2 as BmpBacktop2,
|
|
11479
12181
|
_sfc_main$a as BmpBadge,
|
|
11480
12182
|
ElBadge2 as BmpBadge2,
|
|
@@ -11517,7 +12219,7 @@ export {
|
|
|
11517
12219
|
ElForm2 as BmpForm,
|
|
11518
12220
|
ElFormItem2 as BmpFormItem,
|
|
11519
12221
|
ElHeader2 as BmpHeader,
|
|
11520
|
-
_sfc_main$
|
|
12222
|
+
_sfc_main$x as BmpIcon,
|
|
11521
12223
|
ElIcon2 as BmpIcon2,
|
|
11522
12224
|
ElImage2 as BmpImage,
|
|
11523
12225
|
ElImageViewer2 as BmpImageViewer,
|
|
@@ -11597,6 +12299,8 @@ export {
|
|
|
11597
12299
|
useLayout as BmpUseLayout,
|
|
11598
12300
|
usePermissionStore as BmpUsePermissionStore,
|
|
11599
12301
|
usePermissionStoreWithOut as BmpUsePermissionStoreWithOut,
|
|
12302
|
+
useTagsViewStore as BmpUseTagsViewStore,
|
|
12303
|
+
useTagsViewStoreWithOut as BmpUseTagsViewStoreWithOut,
|
|
11600
12304
|
useUserStore as BmpUseUserStore,
|
|
11601
12305
|
useUserStoreWithOut as BmpUseUserStoreWithOut,
|
|
11602
12306
|
ElWatermark2 as BmpWatermark,
|