@dt-frames/ui 2.0.15 → 2.0.16
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/es/assets/imgs/tree/forder-open.svg +1 -0
- package/es/assets/imgs/tree/forder.svg +1 -0
- package/es/assets/locales/zh.ts +1 -1
- package/es/components/curd/index.js +28 -8
- package/es/components/curd/src/components/Curd.d.ts +10 -0
- package/es/components/curd/src/hooks/useCurd.d.ts +2 -4
- package/es/components/curd/src/props.d.ts +5 -1
- package/es/components/drawer/index.js +25 -24
- package/es/components/form/index.js +50 -37
- package/es/components/form/index.less +16 -0
- package/es/components/form/src/props.d.ts +1 -1
- package/es/components/modal/index.js +8 -143
- package/es/components/modal/index.less +23 -0
- package/es/components/modal/src/index.d.ts +2 -84
- package/es/components/table/index.js +2 -2
- package/es/components/tree/index.js +197 -93
- package/es/components/tree/index.less +75 -13
- package/es/components/tree/src/basicProps.d.ts +46 -7
- package/es/components/tree/src/components/TreeHeader.d.ts +2 -2
- package/es/components/tree/src/hooks/useTree.d.ts +3 -2
- package/es/components/tree/src/index.d.ts +120 -29
- package/es/components/upload/index.js +28 -20
- package/es/components/upload/index.less +10 -1
- package/es/components/upload/src/index.d.ts +1 -1
- package/es/components/upload/src/utils/upload.d.ts +1 -1
- package/es/theme/index.js +307 -307
- package/es/theme/index.less +1 -0
- package/es/theme/src/components/header/components/size.d.ts +5 -5
- package/es/theme/src/components/header/index.d.ts +5 -5
- package/es/theme/src/components/header/multiple-header.d.ts +5 -5
- package/es/theme/src/index.d.ts +10 -10
- package/manualContentPath.js +10 -0
- package/package.json +1 -1
- package/tsconfig.json +1 -1
- package/es/packages/ui/src/assets/locales/en.d.ts +0 -103
- package/es/packages/ui/src/assets/locales/index.d.ts +0 -2
- package/es/packages/ui/src/assets/locales/zh.d.ts +0 -104
- package/es/packages/ui/src/components/form/index.d.ts +0 -7
- package/es/packages/ui/src/components/form/src/components/FormButtons.d.ts +0 -105
- package/es/packages/ui/src/components/form/src/components/FormItem.d.ts +0 -159
- package/es/packages/ui/src/components/form/src/components/componentMap.d.ts +0 -4
- package/es/packages/ui/src/components/form/src/components/formIcon.d.ts +0 -1223
- package/es/packages/ui/src/components/form/src/components/formInputUseDialog.d.ts +0 -911
- package/es/packages/ui/src/components/form/src/components/index.d.ts +0 -4
- package/es/packages/ui/src/components/form/src/components/radioButton.d.ts +0 -34
- package/es/packages/ui/src/components/form/src/enums/index.d.ts +0 -7
- package/es/packages/ui/src/components/form/src/hooks/helper.d.ts +0 -14
- package/es/packages/ui/src/components/form/src/hooks/useForm.d.ts +0 -6
- package/es/packages/ui/src/components/form/src/hooks/useFormActions.d.ts +0 -12
- package/es/packages/ui/src/components/form/src/hooks/useFormEvent.d.ts +0 -25
- package/es/packages/ui/src/components/form/src/hooks/useFormValue.d.ts +0 -3
- package/es/packages/ui/src/components/form/src/hooks/useFormValues.d.ts +0 -11
- package/es/packages/ui/src/components/form/src/hooks/useLabelWidth.d.ts +0 -6
- package/es/packages/ui/src/components/form/src/props.d.ts +0 -127
- package/es/packages/ui/src/components/form/src/types/actions.type.d.ts +0 -15
- package/es/packages/ui/src/components/form/src/types/form.type.d.ts +0 -79
- package/es/packages/ui/src/components/form/src/types/items.type.d.ts +0 -409
- package/es/packages/ui/src/components/iframe/index.d.ts +0 -2
- package/es/packages/ui/src/components/modal/index.d.ts +0 -4
- package/es/packages/ui/src/components/modal/src/hooks/useModal.d.ts +0 -5
- package/es/packages/ui/src/components/modal/src/props.d.ts +0 -101
- package/es/packages/ui/src/components/modal/src/types/modal.type.d.ts +0 -17
- package/es/packages/ui/src/components/upload/index.d.ts +0 -4
- package/es/packages/ui/src/components/upload/src/basicProps.d.ts +0 -87
- package/es/packages/ui/src/components/upload/src/components/PdfView.d.ts +0 -9
- package/es/packages/ui/src/components/upload/src/components/WordView.d.ts +0 -6
- package/es/packages/ui/src/components/upload/src/hooks/useFile.d.ts +0 -16
- package/es/packages/ui/src/components/upload/src/index.d.ts +0 -242
- package/es/packages/ui/src/components/upload/src/type/file.d.ts +0 -10
- package/es/packages/ui/src/components/upload/src/utils/upload.d.ts +0 -2
- package/es/packages/ui/src/global.d.ts +0 -7
- package/es/packages/ui/src/theme/index.d.ts +0 -12
- package/es/packages/ui/src/theme/src/components/header/helper/menu-tree.d.ts +0 -4
- package/es/packages/ui/src/theme/src/enums/index.d.ts +0 -1
- package/es/packages/ui/src/theme/src/enums/theme.enum.d.ts +0 -34
- package/es/packages/ui/src/theme/src/hooks/index.d.ts +0 -6
- package/es/packages/ui/src/theme/src/hooks/useDragLine.d.ts +0 -2
- package/es/packages/ui/src/theme/src/hooks/useHeader.d.ts +0 -25
- package/es/packages/ui/src/theme/src/hooks/useMenu.d.ts +0 -29
- package/es/packages/ui/src/theme/src/hooks/useMultifyTab.d.ts +0 -8
- package/es/packages/ui/src/theme/src/hooks/useOpenKeys.d.ts +0 -7
- package/es/packages/ui/src/theme/src/hooks/useTheme.d.ts +0 -9
- package/es/packages/ui/src/theme/src/setting/theme.setting.d.ts +0 -2
- package/es/packages/ui/src/theme/src/stores/index.d.ts +0 -3
- package/es/packages/ui/src/theme/src/stores/routeReuse.store.d.ts +0 -25
- package/es/packages/ui/src/theme/src/stores/theme.store.d.ts +0 -19
- package/es/packages/ui/src/theme/src/types/index.d.ts +0 -3
- package/es/packages/ui/src/theme/src/types/menu.type.d.ts +0 -15
- package/es/packages/ui/src/theme/src/types/theme.type.d.ts +0 -62
- package/es/packages/ui/src/utils/withInstall.d.ts +0 -4
package/es/theme/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BackTop, MenuItem, MenuDivider, Menu, Dropdown, TabPane, Tabs, Breadcrumb, Empty, InputSearch, Popover, Avatar, InputPassword, Button, Modal, Tooltip, Select, Switch, Divider, Drawer, SubMenu, LayoutHeader, LayoutSider, LayoutContent, Layout, ConfigProvider } from "ant-design-vue/es";
|
|
2
2
|
import "ant-design-vue/es/config-provider/style";
|
|
3
3
|
import "ant-design-vue/es/layout/style";
|
|
4
|
-
import { toRaw, unref
|
|
4
|
+
import { toRaw, unref, computed, onMounted, nextTick, defineComponent, openBlock, createBlock, createCommentVNode, createElementBlock, createElementVNode, reactive, withCtx, createVNode, Fragment, renderList, normalizeClass, toDisplayString, ref, watch, createSlots, getCurrentInstance, inject, onUnmounted, h, provide, onBeforeUnmount, normalizeStyle, resolveDynamicComponent, renderSlot, mergeProps, withDirectives, vShow, watchEffect, resolveDirective, withKeys, createTextVNode, normalizeProps, guardReactiveProps, resolveComponent, toRef, withModifiers, Transition, KeepAlive, toRefs } from "vue";
|
|
5
5
|
import { useRouter, RouterView } from "vue-router";
|
|
6
6
|
import { DtCache, CacheKey, deepMerge, Pages, useGo, useRedo, Language, isObject, useTimeoutFn, useI18n, menuList2Map, isNullAndUnDef, off, on, getParentSlots, isBoolean, localeList, changeLocale, isFunction, copyText, isUrl, openWindow, useApp, withInstall as withInstall$1 } from "@dt-frames/core";
|
|
7
7
|
import { defineStore } from "pinia";
|
|
@@ -162,7 +162,7 @@ const useThemeStore = defineStore({
|
|
|
162
162
|
});
|
|
163
163
|
function handleGotoPage(router) {
|
|
164
164
|
const go = useGo(router);
|
|
165
|
-
go(unref
|
|
165
|
+
go(unref(router.currentRoute).path, true);
|
|
166
166
|
}
|
|
167
167
|
const useRouteReuseStore = defineStore({
|
|
168
168
|
id: "route-reuse",
|
|
@@ -222,7 +222,7 @@ const useRouteReuseStore = defineStore({
|
|
|
222
222
|
closeAllTab(currentRoute, router) {
|
|
223
223
|
const go = useGo(router);
|
|
224
224
|
let filterTabList = this.tabList.filter((item) => item?.meta?.affix ?? false);
|
|
225
|
-
const route = filterTabList.length > 0 ? filterTabList[filterTabList.length - 1] : unref
|
|
225
|
+
const route = filterTabList.length > 0 ? filterTabList[filterTabList.length - 1] : unref(currentRoute);
|
|
226
226
|
this.tabList = [route];
|
|
227
227
|
this.updateCacheTab();
|
|
228
228
|
go(route.path);
|
|
@@ -302,7 +302,7 @@ const useRouteReuseStore = defineStore({
|
|
|
302
302
|
this.cacheTabList = cacheMap;
|
|
303
303
|
},
|
|
304
304
|
async refreshPage(router) {
|
|
305
|
-
const findTab = this.getCachedTabList.find((item) => item === unref
|
|
305
|
+
const findTab = this.getCachedTabList.find((item) => item === unref(router.currentRoute).name);
|
|
306
306
|
if (findTab) {
|
|
307
307
|
this.cacheTabList.delete(findTab.toString());
|
|
308
308
|
}
|
|
@@ -328,46 +328,46 @@ function useMenu() {
|
|
|
328
328
|
const getMenuFixed = computed(() => useThemeStore().getMenuConf.fixed);
|
|
329
329
|
const getShowMenu = computed(() => useThemeStore().getMenuConf.show);
|
|
330
330
|
const getShowSidebar = computed(() => {
|
|
331
|
-
return unref
|
|
331
|
+
return unref(getSplit) || unref(getShowMenu) && unref(getMenuMode) !== MenuMode.HORIZONTAL;
|
|
332
332
|
});
|
|
333
333
|
const getMenuHidden = computed(() => useThemeStore().getMenuConf.hidden);
|
|
334
334
|
const getMenuTheme = computed(() => useThemeStore().getMenuConf.theme);
|
|
335
335
|
const getTrigger = computed(() => useThemeStore().getMenuConf.trigger);
|
|
336
336
|
const getCanDrag = computed(() => useThemeStore().getMenuConf.canDrag);
|
|
337
337
|
const getIsMixMode = computed(() => {
|
|
338
|
-
return unref
|
|
338
|
+
return unref(getMenuMode) === MenuMode.INLINE && unref(getMenuType) === MenuType.MIX;
|
|
339
339
|
});
|
|
340
|
-
const getIsMixSidebar = computed(() => unref
|
|
340
|
+
const getIsMixSidebar = computed(() => unref(getMenuType) === MenuType.MIX_SIDEBAR);
|
|
341
341
|
const getMenuWidth = computed(() => {
|
|
342
|
-
if (unref
|
|
342
|
+
if (unref(getIsMixMode)) {
|
|
343
343
|
return Number(useThemeStore().getMenuConf.menuWidth) - 40;
|
|
344
|
-
} else if (unref
|
|
344
|
+
} else if (unref(getIsMixSidebar)) {
|
|
345
345
|
return Number(useThemeStore().getMenuConf.menuWidth) - 10;
|
|
346
346
|
} else {
|
|
347
347
|
return Number(useThemeStore().getMenuConf.menuWidth);
|
|
348
348
|
}
|
|
349
349
|
});
|
|
350
350
|
const getMixSideTrigger = computed(() => useThemeStore().getMenuConf.mixSideTrigger);
|
|
351
|
-
const getLogoWidth = computed(() => unref
|
|
351
|
+
const getLogoWidth = computed(() => unref(getIsMixSidebar) ? "80px" : useThemeStore().getMenuConf.menuWidth);
|
|
352
352
|
const getMenuType = computed(() => useThemeStore().getMenuConf.type);
|
|
353
|
-
const getIsTopMenu = computed(() => unref
|
|
353
|
+
const getIsTopMenu = computed(() => unref(getMenuType) === MenuType.TOP_MENU);
|
|
354
354
|
const getMenuMode = computed(() => useThemeStore().getMenuConf.mode);
|
|
355
355
|
const getSplit = computed(() => useThemeStore().getMenuConf.split);
|
|
356
356
|
const getCollapsed = computed(() => useThemeStore().getMenuConf.collapsed);
|
|
357
|
-
const getIsHorizontal = computed(() => unref
|
|
357
|
+
const getIsHorizontal = computed(() => unref(getMenuMode) === MenuMode.HORIZONTAL);
|
|
358
358
|
const setThemeStore = (conf = {}) => setThemeConf(conf);
|
|
359
359
|
const toggleCollapsed = () => setThemeStore({
|
|
360
360
|
menuOptions: {
|
|
361
|
-
collapsed: !unref
|
|
361
|
+
collapsed: !unref(getCollapsed)
|
|
362
362
|
}
|
|
363
363
|
});
|
|
364
364
|
const getMiniWidthNumber = computed(() => useThemeStore().getMenuConf.collapsedShowTitle ? 80 : 48);
|
|
365
365
|
const getRealWidth = computed(() => {
|
|
366
|
-
return unref
|
|
366
|
+
return unref(getCollapsed) ? unref(getMiniWidthNumber) : unref(getMenuWidth);
|
|
367
367
|
});
|
|
368
368
|
const getCalcContentWidth = computed(() => {
|
|
369
|
-
const width = unref
|
|
370
|
-
return `calc(100% - ${unref
|
|
369
|
+
const width = unref(getIsTopMenu) || !unref(getShowMenu) || unref(getSplit) && unref(getMenuHidden) ? 0 : unref(getRealWidth);
|
|
370
|
+
return `calc(100% - ${unref(width)}px)`;
|
|
371
371
|
});
|
|
372
372
|
return {
|
|
373
373
|
getCollapsedShowTitle,
|
|
@@ -432,37 +432,37 @@ function useHeader() {
|
|
|
432
432
|
const { getShowMultipleTab, getMultipleTabPosIsTop } = useMultipleTab();
|
|
433
433
|
const getHeaderTheme = computed(() => getHeaderConf.theme);
|
|
434
434
|
const getFixed = computed(() => getHeaderConf.fixed);
|
|
435
|
-
const getShowHeaderLogo = computed(() => unref
|
|
435
|
+
const getShowHeaderLogo = computed(() => unref(getShowLogo) && !unref(getIsSidebarType) && !unref(getIsMixSidebar));
|
|
436
436
|
const getShowSearch = computed(() => getHeaderConf.showSearch);
|
|
437
437
|
const getShowHeaderTrigger = computed(() => {
|
|
438
|
-
if (unref
|
|
438
|
+
if (unref(getMenuType) === MenuType.TOP_MENU || !unref(getShowMenu) || unref(getMenuHidden)) {
|
|
439
439
|
return false;
|
|
440
440
|
}
|
|
441
|
-
return unref
|
|
441
|
+
return unref(getTrigger);
|
|
442
442
|
});
|
|
443
443
|
const getShowBreadCrumb = computed(() => getHeaderConf.showBreadCrumb);
|
|
444
444
|
const getShowBread = computed(
|
|
445
|
-
() => unref
|
|
445
|
+
() => unref(getMenuMode) !== MenuMode.HORIZONTAL && !unref(getSplit) && unref(getShowBreadCrumb)
|
|
446
446
|
);
|
|
447
|
-
const getShowTopMenu = computed(() => unref
|
|
447
|
+
const getShowTopMenu = computed(() => unref(getMenuMode) === MenuMode.HORIZONTAL || unref(getSplit));
|
|
448
448
|
const getShowNotice = computed(() => getHeaderConf.showNotice);
|
|
449
449
|
const getShowFullScreen = computed(() => getHeaderConf.showFullScreen);
|
|
450
450
|
const getShowLocale = computed(() => getHeaderConf.showLocaleSwitch);
|
|
451
451
|
const getShowSettingTheme = computed(() => getHeaderConf.showSettingTheme);
|
|
452
452
|
const getShowFullHeaderRef = computed(() => {
|
|
453
|
-
return !unref
|
|
453
|
+
return !unref(getIsSidebarType) && !unref(getIsMixSidebar) && !unref(getIsTopMenu);
|
|
454
454
|
});
|
|
455
455
|
const getHeaderHeight = computed(() => {
|
|
456
456
|
let height = 0;
|
|
457
457
|
height += HEADER_HEIGHT;
|
|
458
|
-
if (unref
|
|
458
|
+
if (unref(getShowMultipleTab) && !unref(getSplit) && !unref(getMultipleTabPosIsTop)) {
|
|
459
459
|
height += TABS_HEIGHT;
|
|
460
460
|
}
|
|
461
461
|
return height;
|
|
462
462
|
});
|
|
463
463
|
const getTabsHeight = computed(() => TABS_HEIGHT);
|
|
464
464
|
const getShowInsetHeaderRef = computed(() => {
|
|
465
|
-
return unref
|
|
465
|
+
return unref(getIsSidebarType) || unref(getIsTopMenu) || unref(getIsMixSidebar);
|
|
466
466
|
});
|
|
467
467
|
const getShowBackToTop = computed(() => getHeaderConf.showBackToTop);
|
|
468
468
|
const getIsZH = computed(() => {
|
|
@@ -621,20 +621,20 @@ function useDragLine(siderRef, dragBarRef) {
|
|
|
621
621
|
});
|
|
622
622
|
});
|
|
623
623
|
function getEl(elRef) {
|
|
624
|
-
const el = unref
|
|
624
|
+
const el = unref(elRef);
|
|
625
625
|
if (!el)
|
|
626
626
|
return null;
|
|
627
627
|
if (Reflect.has(el, "$el")) {
|
|
628
|
-
return unref
|
|
628
|
+
return unref(elRef)?.$el;
|
|
629
629
|
}
|
|
630
|
-
return unref
|
|
630
|
+
return unref(elRef);
|
|
631
631
|
}
|
|
632
632
|
function handleMouseMove(ele, wrap, clientX) {
|
|
633
633
|
document.onmousemove = function(innerE) {
|
|
634
634
|
innerE = innerE || window.event;
|
|
635
635
|
let iT = ele.left + (innerE.clientX - clientX);
|
|
636
636
|
const maxT = 800;
|
|
637
|
-
const minT = unref
|
|
637
|
+
const minT = unref(getMiniWidthNumber);
|
|
638
638
|
iT < 0 && (iT = 0);
|
|
639
639
|
iT > maxT && (iT = maxT);
|
|
640
640
|
iT < minT && (iT = minT);
|
|
@@ -682,7 +682,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
682
682
|
const { getShowBackToTop } = useHeader();
|
|
683
683
|
return (_ctx, _cache) => {
|
|
684
684
|
const _component_ABackTop = BackTop;
|
|
685
|
-
return unref
|
|
685
|
+
return unref(getShowBackToTop) ? (openBlock(), createBlock(_component_ABackTop, {
|
|
686
686
|
key: 0,
|
|
687
687
|
target: getTarget,
|
|
688
688
|
visibilityHeight: 300
|
|
@@ -723,7 +723,7 @@ function useTabs(_router) {
|
|
|
723
723
|
const router = _router || useRouter();
|
|
724
724
|
const { currentRoute } = router;
|
|
725
725
|
const getCurrentTab = () => {
|
|
726
|
-
const route = unref
|
|
726
|
+
const route = unref(currentRoute);
|
|
727
727
|
return tabStore.getTabList.find((item) => item.fullPath === route.fullPath);
|
|
728
728
|
};
|
|
729
729
|
function handleTabAction(action, tab) {
|
|
@@ -765,7 +765,7 @@ function useTabDropdown(tabItem, getIsTabs) {
|
|
|
765
765
|
const tabStore = useRouteReuseStore();
|
|
766
766
|
const { refreshPage, closeAll, close, closeLeft, closeOther, closeRight } = useTabs();
|
|
767
767
|
const getTargetTab = computed(() => {
|
|
768
|
-
return unref
|
|
768
|
+
return unref(getIsTabs) ? tabItem : unref(currentRoute);
|
|
769
769
|
});
|
|
770
770
|
const state = reactive({
|
|
771
771
|
current: null,
|
|
@@ -773,8 +773,8 @@ function useTabDropdown(tabItem, getIsTabs) {
|
|
|
773
773
|
});
|
|
774
774
|
const getDropMenuList = computed(() => {
|
|
775
775
|
const { t } = useI18n("UI");
|
|
776
|
-
const { meta } = unref
|
|
777
|
-
const { path } = unref
|
|
776
|
+
const { meta } = unref(getTargetTab);
|
|
777
|
+
const { path } = unref(currentRoute);
|
|
778
778
|
const curItem = state.current;
|
|
779
779
|
const isCurItem = curItem ? curItem.path === path : false;
|
|
780
780
|
const index = state.currentIndex;
|
|
@@ -864,7 +864,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
864
864
|
const menuLabelMap = menuList2Map();
|
|
865
865
|
const getIsTabs = computed(() => !props.isExtra);
|
|
866
866
|
const getTrigger = computed(
|
|
867
|
-
() => unref
|
|
867
|
+
() => unref(getIsTabs) ? ["contextmenu"] : ["click"]
|
|
868
868
|
);
|
|
869
869
|
const { getDropMenuList, handleContextMenu, handleMenuEvent } = useTabDropdown(props?.tabItem, getIsTabs);
|
|
870
870
|
function handleContext(e) {
|
|
@@ -877,16 +877,16 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
877
877
|
const _component_ADropdown = Dropdown;
|
|
878
878
|
return openBlock(), createBlock(_component_ADropdown, {
|
|
879
879
|
placement: "bottomRight",
|
|
880
|
-
trigger: unref
|
|
880
|
+
trigger: unref(getTrigger),
|
|
881
881
|
overlayClassName: "dt-reuse-tabs__dropdown"
|
|
882
882
|
}, {
|
|
883
883
|
overlay: withCtx(() => [
|
|
884
884
|
createVNode(_component_AMenu, null, {
|
|
885
885
|
default: withCtx(() => [
|
|
886
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref
|
|
886
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(getDropMenuList), (item, index) => {
|
|
887
887
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
888
888
|
createVNode(_component_AMenuItem, {
|
|
889
|
-
onClick: ($event) => unref
|
|
889
|
+
onClick: ($event) => unref(handleMenuEvent)(item),
|
|
890
890
|
disabled: item.disabled
|
|
891
891
|
}, {
|
|
892
892
|
default: withCtx(() => [
|
|
@@ -907,11 +907,11 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
907
907
|
})
|
|
908
908
|
]),
|
|
909
909
|
default: withCtx(() => [
|
|
910
|
-
unref
|
|
910
|
+
unref(getIsTabs) ? (openBlock(), createElementBlock("div", {
|
|
911
911
|
key: 0,
|
|
912
912
|
onContextmenu: handleContext
|
|
913
913
|
}, [
|
|
914
|
-
createElementVNode("span", null, toDisplayString(unref
|
|
914
|
+
createElementVNode("span", null, toDisplayString(unref(menuLabelMap).get(__props.tabItem.path) || __props.tabItem?.meta?.title || unref(t)("UNKNOWN_ROUTE")), 1)
|
|
915
915
|
], 32)) : (openBlock(), createElementBlock("span", {
|
|
916
916
|
key: 1,
|
|
917
917
|
onClick: handleContext,
|
|
@@ -959,7 +959,7 @@ function useSortable(el, options) {
|
|
|
959
959
|
if (!el)
|
|
960
960
|
return;
|
|
961
961
|
const Sortable = (await import("sortablejs")).default;
|
|
962
|
-
Sortable.create(unref
|
|
962
|
+
Sortable.create(unref(el), {
|
|
963
963
|
animation: 500,
|
|
964
964
|
delay: 400,
|
|
965
965
|
delayOnTouchOnly: true,
|
|
@@ -973,7 +973,7 @@ function useTabsDrag(affixList) {
|
|
|
973
973
|
const tabStore = useRouteReuseStore();
|
|
974
974
|
const { getCanDrag } = useMultipleTab();
|
|
975
975
|
nextTick(() => {
|
|
976
|
-
if (!unref
|
|
976
|
+
if (!unref(getCanDrag))
|
|
977
977
|
return;
|
|
978
978
|
const el = document.querySelectorAll(`.dt-reuse-tabs .ant-tabs-nav-list`)?.[0];
|
|
979
979
|
const { initSortable } = useSortable(el, {
|
|
@@ -1005,13 +1005,13 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
1005
1005
|
const getTabsState = computed(() => {
|
|
1006
1006
|
return tabStore.getTabList.filter((item) => !item.meta?.hideTab);
|
|
1007
1007
|
});
|
|
1008
|
-
const unClose = computed(() => unref
|
|
1008
|
+
const unClose = computed(() => unref(getTabsState).length === 1);
|
|
1009
1009
|
function handleChange(activeKey) {
|
|
1010
1010
|
activeKeyRef.value = activeKey;
|
|
1011
1011
|
go(activeKey);
|
|
1012
1012
|
}
|
|
1013
1013
|
function handleEdit(targetKey) {
|
|
1014
|
-
if (unref
|
|
1014
|
+
if (unref(unClose))
|
|
1015
1015
|
return;
|
|
1016
1016
|
tabStore.closeTabByKey(targetKey, router);
|
|
1017
1017
|
}
|
|
@@ -1022,13 +1022,13 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
1022
1022
|
(v) => {
|
|
1023
1023
|
if (v === "/" || v === "/login")
|
|
1024
1024
|
return;
|
|
1025
|
-
const { meta = {} } = unref
|
|
1025
|
+
const { meta = {} } = unref(router.currentRoute);
|
|
1026
1026
|
const { hideTab = false } = meta;
|
|
1027
1027
|
if (activeKeyRef.value !== v) {
|
|
1028
1028
|
activeKeyRef.value = v;
|
|
1029
1029
|
}
|
|
1030
1030
|
if (!hideTab) {
|
|
1031
|
-
tabStore.addTab(unref
|
|
1031
|
+
tabStore.addTab(unref(router.currentRoute));
|
|
1032
1032
|
}
|
|
1033
1033
|
},
|
|
1034
1034
|
{
|
|
@@ -1051,13 +1051,13 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
1051
1051
|
class: "h-8"
|
|
1052
1052
|
}, createSlots({
|
|
1053
1053
|
default: withCtx(() => [
|
|
1054
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref
|
|
1054
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(getTabsState), (item) => {
|
|
1055
1055
|
return openBlock(), createBlock(_component_ATabPane, {
|
|
1056
1056
|
key: item.query ? item.fullPath : item.path,
|
|
1057
1057
|
closable: !(item && item.meta && item.meta.affix)
|
|
1058
1058
|
}, {
|
|
1059
1059
|
tab: withCtx(() => [
|
|
1060
|
-
unref
|
|
1060
|
+
unref(getShowQuick) ? (openBlock(), createBlock(unref(_sfc_main$y), {
|
|
1061
1061
|
key: 0,
|
|
1062
1062
|
tabItem: item
|
|
1063
1063
|
}, null, 8, ["tabItem"])) : createCommentVNode("", true)
|
|
@@ -1068,11 +1068,11 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
1068
1068
|
]),
|
|
1069
1069
|
_: 2
|
|
1070
1070
|
}, [
|
|
1071
|
-
unref
|
|
1071
|
+
unref(getShowRedo) || unref(getShowQuick) ? {
|
|
1072
1072
|
name: "rightExtra",
|
|
1073
1073
|
fn: withCtx(() => [
|
|
1074
|
-
unref
|
|
1075
|
-
unref
|
|
1074
|
+
unref(getShowRedo) ? (openBlock(), createBlock(unref(_sfc_main$z), { key: 0 })) : createCommentVNode("", true),
|
|
1075
|
+
unref(getShowQuick) ? (openBlock(), createBlock(unref(_sfc_main$y), {
|
|
1076
1076
|
key: 1,
|
|
1077
1077
|
isExtra: "",
|
|
1078
1078
|
tabItem: _ctx.$route
|
|
@@ -1092,10 +1092,10 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
1092
1092
|
return (_ctx, _cache) => {
|
|
1093
1093
|
return openBlock(), createElementBlock("span", {
|
|
1094
1094
|
class: "dt_header_icon text-lg text-gray-800 cursor-pointer px-3 hover:bg-gray-500 hover:bg-opacity-50 transition-all duration-300",
|
|
1095
|
-
onClick: _cache[0] || (_cache[0] = (...args) => unref
|
|
1095
|
+
onClick: _cache[0] || (_cache[0] = (...args) => unref(toggle) && unref(toggle)(...args))
|
|
1096
1096
|
}, [
|
|
1097
1097
|
createElementVNode("i", {
|
|
1098
|
-
class: normalizeClass(["i block", !unref
|
|
1098
|
+
class: normalizeClass(["i block", !unref(isFullscreen) ? "ic:baseline-fullscreen" : "ic:baseline-fullscreen-exit"])
|
|
1099
1099
|
}, null, 2)
|
|
1100
1100
|
]);
|
|
1101
1101
|
};
|
|
@@ -1282,29 +1282,29 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
1282
1282
|
return rsStyle;
|
|
1283
1283
|
});
|
|
1284
1284
|
const handleScroll = () => {
|
|
1285
|
-
moveY.value = unref
|
|
1286
|
-
moveX.value = unref
|
|
1285
|
+
moveY.value = unref(wrap).scrollTop * 100 / unref(wrap).clientHeight;
|
|
1286
|
+
moveX.value = unref(wrap).scrollLeft * 100 / unref(wrap).clientWidth;
|
|
1287
1287
|
};
|
|
1288
1288
|
const update = () => {
|
|
1289
|
-
if (!unref
|
|
1289
|
+
if (!unref(wrap))
|
|
1290
1290
|
return;
|
|
1291
|
-
const heightPercentage = unref
|
|
1292
|
-
const widthPercentage = unref
|
|
1291
|
+
const heightPercentage = unref(wrap).clientHeight * 100 / unref(wrap).scrollHeight;
|
|
1292
|
+
const widthPercentage = unref(wrap).clientWidth * 100 / unref(wrap).scrollWidth;
|
|
1293
1293
|
sizeHeight.value = heightPercentage < 100 ? heightPercentage + "%" : "";
|
|
1294
1294
|
sizeWidth.value = widthPercentage < 100 ? widthPercentage + "%" : "";
|
|
1295
1295
|
};
|
|
1296
1296
|
onMounted(() => {
|
|
1297
1297
|
nextTick(update);
|
|
1298
1298
|
if (!props.noresize) {
|
|
1299
|
-
addResizeListener(unref
|
|
1300
|
-
addResizeListener(unref
|
|
1299
|
+
addResizeListener(unref(resize), update);
|
|
1300
|
+
addResizeListener(unref(wrap), update);
|
|
1301
1301
|
addEventListener("resize", update);
|
|
1302
1302
|
}
|
|
1303
1303
|
});
|
|
1304
1304
|
onBeforeUnmount(() => {
|
|
1305
1305
|
if (!props.noresize) {
|
|
1306
|
-
removeResizeListener(unref
|
|
1307
|
-
removeResizeListener(unref
|
|
1306
|
+
removeResizeListener(unref(resize), update);
|
|
1307
|
+
removeResizeListener(unref(wrap), update);
|
|
1308
1308
|
removeEventListener("resize", update);
|
|
1309
1309
|
}
|
|
1310
1310
|
});
|
|
@@ -1314,7 +1314,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
1314
1314
|
ref_key: "wrap",
|
|
1315
1315
|
ref: wrap,
|
|
1316
1316
|
class: normalizeClass([[__props.wrapClass, "scrollbar__wrap--hidden-default"], "h-full overflow-auto"]),
|
|
1317
|
-
style: normalizeStyle(unref
|
|
1317
|
+
style: normalizeStyle(unref(style)),
|
|
1318
1318
|
onScroll: handleScroll
|
|
1319
1319
|
}, [
|
|
1320
1320
|
(openBlock(), createBlock(resolveDynamicComponent(__props.tag), {
|
|
@@ -1329,11 +1329,11 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
1329
1329
|
_: 3
|
|
1330
1330
|
}, 8, ["class", "style"]))
|
|
1331
1331
|
], 38),
|
|
1332
|
-
createVNode(unref
|
|
1332
|
+
createVNode(unref(Bar), {
|
|
1333
1333
|
move: moveX.value,
|
|
1334
1334
|
size: sizeWidth.value
|
|
1335
1335
|
}, null, 8, ["move", "size"]),
|
|
1336
|
-
createVNode(unref
|
|
1336
|
+
createVNode(unref(Bar), {
|
|
1337
1337
|
vertical: "",
|
|
1338
1338
|
move: moveY.value,
|
|
1339
1339
|
size: sizeHeight.value
|
|
@@ -1373,7 +1373,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
1373
1373
|
const props = __props;
|
|
1374
1374
|
const Container = h("div", [props.template(props.data)]);
|
|
1375
1375
|
return (_ctx, _cache) => {
|
|
1376
|
-
return openBlock(), createBlock(unref
|
|
1376
|
+
return openBlock(), createBlock(unref(Container));
|
|
1377
1377
|
};
|
|
1378
1378
|
}
|
|
1379
1379
|
});
|
|
@@ -1407,17 +1407,17 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
1407
1407
|
});
|
|
1408
1408
|
return (_ctx, _cache) => {
|
|
1409
1409
|
return openBlock(), createElementBlock("div", {
|
|
1410
|
-
class: normalizeClass(unref
|
|
1410
|
+
class: normalizeClass(unref(getLogoClass)),
|
|
1411
1411
|
style: normalizeStyle({
|
|
1412
|
-
minWidth: `${unref
|
|
1412
|
+
minWidth: `${unref(getLogoWidth)}px`
|
|
1413
1413
|
})
|
|
1414
1414
|
}, [
|
|
1415
|
-
unref
|
|
1415
|
+
unref(slots)?.logo ? (openBlock(), createBlock(unref(DtSlotContainer), {
|
|
1416
1416
|
key: 0,
|
|
1417
|
-
template: unref
|
|
1417
|
+
template: unref(slots).logo
|
|
1418
1418
|
}, null, 8, ["template"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
1419
|
-
createElementVNode("img", { src: unref
|
|
1420
|
-
withDirectives(createElementVNode("div", { class: "dt-logo__title text-base font-bold transition-all duration-500 pl-3" }, toDisplayString(unref
|
|
1419
|
+
createElementVNode("img", { src: unref(logoUrl) }, null, 8, _hoisted_1$g),
|
|
1420
|
+
withDirectives(createElementVNode("div", { class: "dt-logo__title text-base font-bold transition-all duration-500 pl-3" }, toDisplayString(unref(title)), 513), [
|
|
1421
1421
|
[vShow, __props.showTitle]
|
|
1422
1422
|
])
|
|
1423
1423
|
], 64))
|
|
@@ -1434,10 +1434,10 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
1434
1434
|
return (_ctx, _cache) => {
|
|
1435
1435
|
return openBlock(), createElementBlock("div", {
|
|
1436
1436
|
class: normalizeClass(["flex w-12 h-full cursor-pointer items-center justify-center", props.theme]),
|
|
1437
|
-
onClick: _cache[0] || (_cache[0] = (...args) => unref
|
|
1437
|
+
onClick: _cache[0] || (_cache[0] = (...args) => unref(toggleCollapsed) && unref(toggleCollapsed)(...args))
|
|
1438
1438
|
}, [
|
|
1439
1439
|
createElementVNode("i", {
|
|
1440
|
-
class: normalizeClass(["i leading-none", unref
|
|
1440
|
+
class: normalizeClass(["i leading-none", unref(getCollapsed) ? "ic:baseline-format-indent-increase" : "ic:baseline-format-indent-decrease"])
|
|
1441
1441
|
}, null, 2)
|
|
1442
1442
|
], 2);
|
|
1443
1443
|
};
|
|
@@ -1460,9 +1460,9 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
1460
1460
|
return (_ctx, _cache) => {
|
|
1461
1461
|
const _component_ABreadcrumb = Breadcrumb;
|
|
1462
1462
|
return openBlock(), createElementBlock("div", _hoisted_1$f, [
|
|
1463
|
-
createVNode(_component_ABreadcrumb, { routes: unref
|
|
1463
|
+
createVNode(_component_ABreadcrumb, { routes: unref(routes) }, {
|
|
1464
1464
|
itemRender: withCtx(({ route }) => [
|
|
1465
|
-
createElementVNode("span", null, toDisplayString((unref
|
|
1465
|
+
createElementVNode("span", null, toDisplayString((unref(getIsZH) ? route.label : route.enLabel) || route.meta?.title), 1)
|
|
1466
1466
|
]),
|
|
1467
1467
|
_: 1
|
|
1468
1468
|
}, 8, ["routes"])
|
|
@@ -1511,7 +1511,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
1511
1511
|
const _component_AEmpty = Empty;
|
|
1512
1512
|
const _component_AInputSearch = InputSearch;
|
|
1513
1513
|
const _component_APopover = Popover;
|
|
1514
|
-
return unref
|
|
1514
|
+
return unref(isUseDef) ? (openBlock(), createElementBlock("div", _hoisted_1$e, [
|
|
1515
1515
|
createVNode(_component_APopover, {
|
|
1516
1516
|
placement: "bottom",
|
|
1517
1517
|
overlayClassName: "dt-menu-filter__popover",
|
|
@@ -1523,7 +1523,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
1523
1523
|
return openBlock(), createElementBlock("p", {
|
|
1524
1524
|
onClick: ($event) => navigation(menu.url),
|
|
1525
1525
|
class: "px-5 leading-9 border-gray-200 border-dashed border-b m-0 cursor-pointer transition-all duration-300 text-13"
|
|
1526
|
-
}, toDisplayString(unref
|
|
1526
|
+
}, toDisplayString(unref(getIsZH) ? menu.label : menu.enLabel), 9, _hoisted_2$9);
|
|
1527
1527
|
}), 256)),
|
|
1528
1528
|
!menuList.value.length ? (openBlock(), createElementBlock("div", _hoisted_3$7, [
|
|
1529
1529
|
createVNode(_component_AEmpty, {
|
|
@@ -1536,9 +1536,9 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
1536
1536
|
createVNode(_component_AInputSearch, {
|
|
1537
1537
|
value: filter.value,
|
|
1538
1538
|
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => filter.value = $event),
|
|
1539
|
-
placeholder: unref
|
|
1539
|
+
placeholder: unref(t)("FILTER_MORE"),
|
|
1540
1540
|
onInput: filterMenu,
|
|
1541
|
-
size: unref
|
|
1541
|
+
size: unref(UiSize).SMALL
|
|
1542
1542
|
}, null, 8, ["value", "placeholder", "size"])
|
|
1543
1543
|
]),
|
|
1544
1544
|
_: 1
|
|
@@ -1585,10 +1585,10 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
1585
1585
|
}, {
|
|
1586
1586
|
content: withCtx(() => [
|
|
1587
1587
|
createElementVNode("ul", _hoisted_1$d, [
|
|
1588
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref
|
|
1588
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(localeList), (it) => {
|
|
1589
1589
|
return openBlock(), createElementBlock("li", {
|
|
1590
1590
|
onClick: ($event) => toggleLang(it.event),
|
|
1591
|
-
class: normalizeClass(["px-4 my-1 leading-9 flex border-gray-200 cursor-pointer hover:bg-gray-100 transition-all duration-300 text-13", it.event === unref
|
|
1591
|
+
class: normalizeClass(["px-4 my-1 leading-9 flex border-gray-200 cursor-pointer hover:bg-gray-100 transition-all duration-300 text-13", it.event === unref(currentLang) ? "active bg-gray-100" : ""])
|
|
1592
1592
|
}, [
|
|
1593
1593
|
withDirectives(createElementVNode("span", _hoisted_3$6, null, 512), [
|
|
1594
1594
|
[_directive_icon, it.icon]
|
|
@@ -1622,9 +1622,9 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1622
1622
|
overlayClassName: "dt-notify__popover"
|
|
1623
1623
|
}, {
|
|
1624
1624
|
content: withCtx(() => [
|
|
1625
|
-
unref
|
|
1625
|
+
unref(slots)?.notify ? (openBlock(), createBlock(unref(DtSlotContainer$1), {
|
|
1626
1626
|
key: 0,
|
|
1627
|
-
template: unref
|
|
1627
|
+
template: unref(slots).notify
|
|
1628
1628
|
}, null, 8, ["template"])) : createCommentVNode("", true)
|
|
1629
1629
|
]),
|
|
1630
1630
|
default: withCtx(() => [
|
|
@@ -1632,9 +1632,9 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1632
1632
|
withDirectives(createElementVNode("span", null, null, 512), [
|
|
1633
1633
|
[_directive_icon, "ant-design:bell-outlined"]
|
|
1634
1634
|
]),
|
|
1635
|
-
unref
|
|
1635
|
+
unref(slots)?.notifyBadge ? (openBlock(), createBlock(unref(DtSlotContainer$1), {
|
|
1636
1636
|
key: 0,
|
|
1637
|
-
template: unref
|
|
1637
|
+
template: unref(slots).notifyBadge
|
|
1638
1638
|
}, null, 8, ["template"])) : createCommentVNode("", true)
|
|
1639
1639
|
])
|
|
1640
1640
|
]),
|
|
@@ -1678,7 +1678,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
1678
1678
|
});
|
|
1679
1679
|
}
|
|
1680
1680
|
return (_ctx, _cache) => {
|
|
1681
|
-
return openBlock(), createBlock(unref
|
|
1681
|
+
return openBlock(), createBlock(unref(Popover$1), {
|
|
1682
1682
|
placement: "bottom",
|
|
1683
1683
|
visible: visible.value,
|
|
1684
1684
|
"onUpdate:visible": _cache[0] || (_cache[0] = ($event) => visible.value = $event),
|
|
@@ -1690,7 +1690,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
1690
1690
|
(openBlock(), createElementBlock(Fragment, null, renderList(sizeList, (it) => {
|
|
1691
1691
|
return createElementVNode("li", {
|
|
1692
1692
|
onClick: ($event) => toggleLang(it.event),
|
|
1693
|
-
class: normalizeClass(["px-4 my-1 leading-9 flex border-gray-200 cursor-pointer hover:bg-gray-100 transition-all duration-300 text-13", it.event === unref
|
|
1693
|
+
class: normalizeClass(["px-4 my-1 leading-9 flex border-gray-200 cursor-pointer hover:bg-gray-100 transition-all duration-300 text-13", it.event === unref(getUiSize) ? "active bg-gray-100" : ""])
|
|
1694
1694
|
}, [
|
|
1695
1695
|
createElementVNode("span", null, toDisplayString(it.text), 1)
|
|
1696
1696
|
], 10, _hoisted_2$7);
|
|
@@ -1768,7 +1768,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
1768
1768
|
visible.value = true;
|
|
1769
1769
|
}
|
|
1770
1770
|
function onLock() {
|
|
1771
|
-
useLockscreen.setLock(true, unref
|
|
1771
|
+
useLockscreen.setLock(true, unref(password));
|
|
1772
1772
|
visible.value = false;
|
|
1773
1773
|
popoverVisible.value = false;
|
|
1774
1774
|
}
|
|
@@ -1789,11 +1789,11 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
1789
1789
|
}, {
|
|
1790
1790
|
content: withCtx(() => [
|
|
1791
1791
|
createElementVNode("div", _hoisted_1$a, [
|
|
1792
|
-
unref
|
|
1792
|
+
unref(slots).userInfo ? (openBlock(), createBlock(unref(DtSlotContainer$1), {
|
|
1793
1793
|
key: 0,
|
|
1794
|
-
template: unref
|
|
1794
|
+
template: unref(slots).userInfo
|
|
1795
1795
|
}, null, 8, ["template"])) : createCommentVNode("", true),
|
|
1796
|
-
unref
|
|
1796
|
+
unref(getLockscreen) ? (openBlock(), createElementBlock("div", {
|
|
1797
1797
|
key: 1,
|
|
1798
1798
|
onClick: _cache[0] || (_cache[0] = ($event) => lockScreen()),
|
|
1799
1799
|
class: "px-4 my-1 leading-9 flex border-gray-200 cursor-pointer hover:bg-gray-100 transition-all duration-300 text-13"
|
|
@@ -1803,7 +1803,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
1803
1803
|
]),
|
|
1804
1804
|
_hoisted_3$4
|
|
1805
1805
|
])) : createCommentVNode("", true),
|
|
1806
|
-
unref
|
|
1806
|
+
unref(getShowLoginOut) ? (openBlock(), createElementBlock("div", {
|
|
1807
1807
|
key: 2,
|
|
1808
1808
|
onClick: _cache[1] || (_cache[1] = ($event) => signOut()),
|
|
1809
1809
|
class: "px-4 my-1 leading-9 flex border-gray-200 cursor-pointer hover:bg-gray-100 transition-all duration-300 text-13"
|
|
@@ -1811,7 +1811,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
1811
1811
|
withDirectives(createElementVNode("span", _hoisted_4$4, null, 512), [
|
|
1812
1812
|
[_directive_icon, "ant-design:logout-outlined"]
|
|
1813
1813
|
]),
|
|
1814
|
-
createElementVNode("span", null, toDisplayString(unref
|
|
1814
|
+
createElementVNode("span", null, toDisplayString(unref(t)("LOGIN_OUT")), 1)
|
|
1815
1815
|
])) : createCommentVNode("", true)
|
|
1816
1816
|
])
|
|
1817
1817
|
]),
|
|
@@ -1819,14 +1819,14 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
1819
1819
|
createElementVNode("div", _hoisted_5$3, [
|
|
1820
1820
|
createVNode(_component_AAvatar, { size: 28 }, createSlots({
|
|
1821
1821
|
default: withCtx(() => [
|
|
1822
|
-
unref
|
|
1822
|
+
unref(slots)?.icon ? (openBlock(), createBlock(unref(DtSlotContainer$1), {
|
|
1823
1823
|
key: 0,
|
|
1824
|
-
template: unref
|
|
1824
|
+
template: unref(slots).icon
|
|
1825
1825
|
}, null, 8, ["template"])) : createCommentVNode("", true)
|
|
1826
1826
|
]),
|
|
1827
1827
|
_: 2
|
|
1828
1828
|
}, [
|
|
1829
|
-
!unref
|
|
1829
|
+
!unref(slots)?.icon ? {
|
|
1830
1830
|
name: "icon",
|
|
1831
1831
|
fn: withCtx(() => [
|
|
1832
1832
|
_hoisted_6$3
|
|
@@ -1834,7 +1834,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
1834
1834
|
key: "0"
|
|
1835
1835
|
} : void 0
|
|
1836
1836
|
]), 1024),
|
|
1837
|
-
createElementVNode("span", _hoisted_7$2, toDisplayString(unref
|
|
1837
|
+
createElementVNode("span", _hoisted_7$2, toDisplayString(unref(getUserInfo)?.userNo), 1)
|
|
1838
1838
|
])
|
|
1839
1839
|
]),
|
|
1840
1840
|
_: 1
|
|
@@ -1848,11 +1848,11 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
1848
1848
|
}, {
|
|
1849
1849
|
default: withCtx(() => [
|
|
1850
1850
|
createElementVNode("div", _hoisted_8$2, [
|
|
1851
|
-
unref
|
|
1851
|
+
unref(slots)?.icon ? (openBlock(), createBlock(unref(DtSlotContainer$1), {
|
|
1852
1852
|
key: 0,
|
|
1853
|
-
template: unref
|
|
1853
|
+
template: unref(slots).icon
|
|
1854
1854
|
}, null, 8, ["template"])) : createCommentVNode("", true),
|
|
1855
|
-
createElementVNode("span", _hoisted_9$2, toDisplayString(unref
|
|
1855
|
+
createElementVNode("span", _hoisted_9$2, toDisplayString(unref(getUserInfo)?.userNo), 1),
|
|
1856
1856
|
createVNode(_component_AInputPassword, {
|
|
1857
1857
|
class: "mt-2",
|
|
1858
1858
|
autofocus: "",
|
|
@@ -2041,7 +2041,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2041
2041
|
shadow-gray-200`,
|
|
2042
2042
|
`dt-menu-type__item--${item.type}`,
|
|
2043
2043
|
{
|
|
2044
|
-
[`dt-menu-type__item--active`]: unref
|
|
2044
|
+
[`dt-menu-type__item--active`]: unref(getMenuType) === item.type && unref(getMenuMode) === item.mode
|
|
2045
2045
|
}
|
|
2046
2046
|
])
|
|
2047
2047
|
}, _hoisted_4$3, 10, _hoisted_2$5)
|
|
@@ -2079,7 +2079,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
2079
2079
|
const _component_ASelect = Select;
|
|
2080
2080
|
return openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
2081
2081
|
createElementVNode("span", null, toDisplayString(__props.title), 1),
|
|
2082
|
-
createVNode(_component_ASelect, mergeProps(unref
|
|
2082
|
+
createVNode(_component_ASelect, mergeProps(unref(getBindValue), {
|
|
2083
2083
|
disabled: __props.disabled,
|
|
2084
2084
|
size: "small",
|
|
2085
2085
|
class: "w-32",
|
|
@@ -2116,10 +2116,10 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2116
2116
|
const _component_ASwitch = Switch;
|
|
2117
2117
|
return openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
2118
2118
|
createElementVNode("span", null, toDisplayString(__props.title), 1),
|
|
2119
|
-
createVNode(_component_ASwitch, mergeProps(unref
|
|
2119
|
+
createVNode(_component_ASwitch, mergeProps(unref(getBindValue), {
|
|
2120
2120
|
disabled: __props.disabled,
|
|
2121
|
-
checkedChildren: unref
|
|
2122
|
-
unCheckedChildren: unref
|
|
2121
|
+
checkedChildren: unref(t)("ON"),
|
|
2122
|
+
unCheckedChildren: unref(t)("OFF"),
|
|
2123
2123
|
onChange: handleChange
|
|
2124
2124
|
}), null, 16, ["disabled", "checkedChildren", "unCheckedChildren"])
|
|
2125
2125
|
]);
|
|
@@ -2206,7 +2206,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
2206
2206
|
key: item.title,
|
|
2207
2207
|
title: item.title,
|
|
2208
2208
|
event: item.event,
|
|
2209
|
-
def: unref
|
|
2209
|
+
def: unref(item.def)
|
|
2210
2210
|
}, null, 8, ["title", "event", "def"]);
|
|
2211
2211
|
}), 64)),
|
|
2212
2212
|
(openBlock(), createElementBlock(Fragment, null, renderList(selectItems, (item) => {
|
|
@@ -2214,7 +2214,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
2214
2214
|
key: item.title,
|
|
2215
2215
|
title: item.title,
|
|
2216
2216
|
event: item.event,
|
|
2217
|
-
def: unref
|
|
2217
|
+
def: unref(item.def),
|
|
2218
2218
|
options: item.options
|
|
2219
2219
|
}, null, 8, ["title", "event", "def", "options"]);
|
|
2220
2220
|
}), 64))
|
|
@@ -2243,24 +2243,24 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2243
2243
|
const defaultConf = getConfig();
|
|
2244
2244
|
function getConfig() {
|
|
2245
2245
|
return {
|
|
2246
|
-
contentMode: unref
|
|
2246
|
+
contentMode: unref(getContentMode),
|
|
2247
2247
|
menuOptions: {
|
|
2248
|
-
mode: unref
|
|
2249
|
-
type: unref
|
|
2250
|
-
split: unref
|
|
2248
|
+
mode: unref(getMenuMode),
|
|
2249
|
+
type: unref(getMenuType),
|
|
2250
|
+
split: unref(getMenuType) === MenuType.MIX ? true : false
|
|
2251
2251
|
},
|
|
2252
2252
|
headOptions: {
|
|
2253
|
-
showBreadCrumb: unref
|
|
2254
|
-
showSearch: unref
|
|
2255
|
-
notice: unref
|
|
2256
|
-
showFullScreen: unref
|
|
2257
|
-
showLocaleSwitch: unref
|
|
2253
|
+
showBreadCrumb: unref(getShowBread),
|
|
2254
|
+
showSearch: unref(getShowSearch),
|
|
2255
|
+
notice: unref(getShowNotice),
|
|
2256
|
+
showFullScreen: unref(getShowFullScreen),
|
|
2257
|
+
showLocaleSwitch: unref(getShowLocale)
|
|
2258
2258
|
},
|
|
2259
2259
|
mulTabsOptions: {
|
|
2260
|
-
show: unref
|
|
2260
|
+
show: unref(getShowMultipleTab)
|
|
2261
2261
|
},
|
|
2262
2262
|
footerOptions: {
|
|
2263
|
-
show: unref
|
|
2263
|
+
show: unref(getShowFooter)
|
|
2264
2264
|
}
|
|
2265
2265
|
};
|
|
2266
2266
|
}
|
|
@@ -2321,25 +2321,25 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2321
2321
|
createVNode(_component_ADrawer, {
|
|
2322
2322
|
visible: visible.value,
|
|
2323
2323
|
"onUpdate:visible": _cache[1] || (_cache[1] = ($event) => visible.value = $event),
|
|
2324
|
-
title: unref
|
|
2324
|
+
title: unref(t)("PROJECT_SETTING"),
|
|
2325
2325
|
placement: "right",
|
|
2326
2326
|
width: "320"
|
|
2327
2327
|
}, {
|
|
2328
2328
|
default: withCtx(() => [
|
|
2329
2329
|
createVNode(_component_ADivider, null, {
|
|
2330
2330
|
default: withCtx(() => [
|
|
2331
|
-
createTextVNode(toDisplayString(unref
|
|
2331
|
+
createTextVNode(toDisplayString(unref(t)("NAV_MODE")), 1)
|
|
2332
2332
|
]),
|
|
2333
2333
|
_: 1
|
|
2334
2334
|
}),
|
|
2335
|
-
createVNode(unref
|
|
2335
|
+
createVNode(unref(_sfc_main$k)),
|
|
2336
2336
|
createVNode(_component_ADivider, null, {
|
|
2337
2337
|
default: withCtx(() => [
|
|
2338
|
-
createTextVNode(toDisplayString(unref
|
|
2338
|
+
createTextVNode(toDisplayString(unref(t)("PAGE_SHOW")), 1)
|
|
2339
2339
|
]),
|
|
2340
2340
|
_: 1
|
|
2341
2341
|
}),
|
|
2342
|
-
createVNode(unref
|
|
2342
|
+
createVNode(unref(_sfc_main$h)),
|
|
2343
2343
|
createVNode(_component_ADivider),
|
|
2344
2344
|
createElementVNode("div", _hoisted_1$6, [
|
|
2345
2345
|
createVNode(_component_AButton, {
|
|
@@ -2349,7 +2349,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2349
2349
|
block: ""
|
|
2350
2350
|
}, {
|
|
2351
2351
|
default: withCtx(() => [
|
|
2352
|
-
createTextVNode(toDisplayString(unref
|
|
2352
|
+
createTextVNode(toDisplayString(unref(t)("COPY")), 1)
|
|
2353
2353
|
]),
|
|
2354
2354
|
_: 1
|
|
2355
2355
|
}),
|
|
@@ -2359,12 +2359,12 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2359
2359
|
block: ""
|
|
2360
2360
|
}, {
|
|
2361
2361
|
default: withCtx(() => [
|
|
2362
|
-
createTextVNode(toDisplayString(unref
|
|
2362
|
+
createTextVNode(toDisplayString(unref(t)("RESET")), 1)
|
|
2363
2363
|
]),
|
|
2364
2364
|
_: 1
|
|
2365
2365
|
})
|
|
2366
2366
|
]),
|
|
2367
|
-
createElementVNode("div", _hoisted_2$4, toDisplayString(unref
|
|
2367
|
+
createElementVNode("div", _hoisted_2$4, toDisplayString(unref(t)("DRAWER_TIPS")), 1)
|
|
2368
2368
|
]),
|
|
2369
2369
|
_: 1
|
|
2370
2370
|
}, 8, ["visible", "title"])
|
|
@@ -2379,21 +2379,21 @@ function useSplitMenu(splitType) {
|
|
|
2379
2379
|
const { getIsHorizontal, getSplit } = useMenu();
|
|
2380
2380
|
const throttleHandleSplitLeftMenu = useThrottleFn(handleSplitLeftMenu, 50);
|
|
2381
2381
|
const splitNotLeft = computed(
|
|
2382
|
-
() => unref
|
|
2382
|
+
() => unref(splitType) !== MenuSplitTye.LEFT && !unref(getIsHorizontal)
|
|
2383
2383
|
);
|
|
2384
2384
|
const getSplitLeft = computed(
|
|
2385
|
-
() => !unref
|
|
2385
|
+
() => !unref(getSplit) || unref(splitType) !== MenuSplitTye.LEFT
|
|
2386
2386
|
);
|
|
2387
2387
|
const getSplitTop = computed(
|
|
2388
|
-
() => unref
|
|
2388
|
+
() => unref(splitType) === MenuSplitTye.TOP
|
|
2389
2389
|
);
|
|
2390
2390
|
const normalType = computed(
|
|
2391
|
-
() => !unref
|
|
2391
|
+
() => !unref(getSplit) || unref(splitType) === MenuSplitTye.NONE
|
|
2392
2392
|
);
|
|
2393
2393
|
watch(
|
|
2394
|
-
[() => unref
|
|
2394
|
+
[() => unref(currentRoute)?.path, () => unref(splitType)],
|
|
2395
2395
|
([path]) => {
|
|
2396
|
-
if (unref
|
|
2396
|
+
if (unref(splitNotLeft))
|
|
2397
2397
|
return;
|
|
2398
2398
|
throttleHandleSplitLeftMenu(path);
|
|
2399
2399
|
},
|
|
@@ -2404,22 +2404,22 @@ function useSplitMenu(splitType) {
|
|
|
2404
2404
|
watch(
|
|
2405
2405
|
() => getSplit.value,
|
|
2406
2406
|
() => {
|
|
2407
|
-
if (unref
|
|
2407
|
+
if (unref(splitNotLeft))
|
|
2408
2408
|
return;
|
|
2409
2409
|
getMenus2();
|
|
2410
2410
|
}
|
|
2411
2411
|
);
|
|
2412
2412
|
function handleSplitLeftMenu(path) {
|
|
2413
|
-
if (unref
|
|
2413
|
+
if (unref(getSplitLeft))
|
|
2414
2414
|
return;
|
|
2415
2415
|
menusRef.value = menusMap.filter((it) => it.includesPath.includes(path))[0]?.children;
|
|
2416
2416
|
}
|
|
2417
2417
|
async function getMenus2() {
|
|
2418
|
-
if (unref
|
|
2418
|
+
if (unref(normalType)) {
|
|
2419
2419
|
menusRef.value = DtCache.getLocal(CacheKey.MENUS)?.children;
|
|
2420
2420
|
return;
|
|
2421
2421
|
}
|
|
2422
|
-
if (unref
|
|
2422
|
+
if (unref(getSplitTop)) {
|
|
2423
2423
|
menusRef.value = await getShallowMenus();
|
|
2424
2424
|
}
|
|
2425
2425
|
}
|
|
@@ -2546,12 +2546,12 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
2546
2546
|
const { getIsZH, getUiSize } = useHeader();
|
|
2547
2547
|
return (_ctx, _cache) => {
|
|
2548
2548
|
return openBlock(), createElementBlock("span", {
|
|
2549
|
-
class: normalizeClass(["dt-basic-menu-item-content-flex items-center dt-menu-item h-full", unref
|
|
2549
|
+
class: normalizeClass(["dt-basic-menu-item-content-flex items-center dt-menu-item h-full", unref(getUiSize)])
|
|
2550
2550
|
}, [
|
|
2551
2551
|
createElementVNode("i", {
|
|
2552
2552
|
class: normalizeClass(["menu-icon i", _ctx.item.icon])
|
|
2553
2553
|
}, null, 2),
|
|
2554
|
-
createElementVNode("span", null, toDisplayString(unref
|
|
2554
|
+
createElementVNode("span", null, toDisplayString(unref(getIsZH) ? _ctx.item.label : _ctx.item.enLabel), 1)
|
|
2555
2555
|
], 2);
|
|
2556
2556
|
};
|
|
2557
2557
|
}
|
|
@@ -2591,17 +2591,17 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
2591
2591
|
const _component_BasicSubMenuItem = resolveComponent("BasicSubMenuItem", true);
|
|
2592
2592
|
const _component_ASubMenu = SubMenu;
|
|
2593
2593
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
2594
|
-
!menuHasChildren(unref
|
|
2595
|
-
menuHasChildren(unref
|
|
2596
|
-
class: normalizeClass([unref
|
|
2597
|
-
key: unref
|
|
2594
|
+
!menuHasChildren(unref(item)) && unref(getShowMenu) ? (openBlock(), createBlock(_sfc_main$e, normalizeProps(mergeProps({ key: 0 }, props)), null, 16)) : createCommentVNode("", true),
|
|
2595
|
+
menuHasChildren(unref(item)) && unref(getShowMenu) ? (openBlock(), createBlock(_component_ASubMenu, {
|
|
2596
|
+
class: normalizeClass([unref(theme)]),
|
|
2597
|
+
key: unref(item).id,
|
|
2598
2598
|
popupClassName: "app-top-menu-popup"
|
|
2599
2599
|
}, {
|
|
2600
2600
|
title: withCtx(() => [
|
|
2601
|
-
createVNode(_sfc_main$f, mergeProps(props, { item: unref
|
|
2601
|
+
createVNode(_sfc_main$f, mergeProps(props, { item: unref(item) }), null, 16, ["item"])
|
|
2602
2602
|
]),
|
|
2603
2603
|
default: withCtx(() => [
|
|
2604
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref
|
|
2604
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(item).children, (childrenItem) => {
|
|
2605
2605
|
return openBlock(), createBlock(_component_BasicSubMenuItem, mergeProps({
|
|
2606
2606
|
key: childrenItem.id
|
|
2607
2607
|
}, props, { item: childrenItem }), null, 16, ["item"]);
|
|
@@ -2646,7 +2646,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
2646
2646
|
(val) => {
|
|
2647
2647
|
if (val === "/")
|
|
2648
2648
|
return;
|
|
2649
|
-
const { meta, path } = unref
|
|
2649
|
+
const { meta, path } = unref(currentRoute);
|
|
2650
2650
|
let activePath = meta?.currentActiveMenu || path;
|
|
2651
2651
|
handleMenuChange(activePath);
|
|
2652
2652
|
},
|
|
@@ -2656,7 +2656,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
2656
2656
|
);
|
|
2657
2657
|
async function handleMenuChange(path) {
|
|
2658
2658
|
setOpenKeys(path);
|
|
2659
|
-
if (isHorizontal && unref
|
|
2659
|
+
if (isHorizontal && unref(getSplit)) {
|
|
2660
2660
|
const parentPath = getBreadCrumb(path, items);
|
|
2661
2661
|
menuState.selectedKeys = [parentPath?.[0]?.url];
|
|
2662
2662
|
} else {
|
|
@@ -2669,9 +2669,9 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
2669
2669
|
}
|
|
2670
2670
|
const { getCollapsed } = useMenu();
|
|
2671
2671
|
const getInlineCollapsed = computed(() => {
|
|
2672
|
-
const isInline = unref
|
|
2672
|
+
const isInline = unref(mode) === MenuMode.INLINE;
|
|
2673
2673
|
if (isInline) {
|
|
2674
|
-
return mixSider ? false : unref
|
|
2674
|
+
return mixSider ? false : unref(getCollapsed);
|
|
2675
2675
|
}
|
|
2676
2676
|
return false;
|
|
2677
2677
|
});
|
|
@@ -2696,9 +2696,9 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
2696
2696
|
mode: _ctx.mode,
|
|
2697
2697
|
collapsible: "",
|
|
2698
2698
|
onClick: handleMenuClick,
|
|
2699
|
-
onOpenChange: unref
|
|
2700
|
-
collapsed: unref
|
|
2701
|
-
class: normalizeClass(unref
|
|
2699
|
+
onOpenChange: unref(handleOpenChange),
|
|
2700
|
+
collapsed: unref(getInlineCollapsed),
|
|
2701
|
+
class: normalizeClass(unref(getSplit) ? "dt-split-menu" : "")
|
|
2702
2702
|
}, {
|
|
2703
2703
|
default: withCtx(() => [
|
|
2704
2704
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.items, (item) => {
|
|
@@ -2747,22 +2747,22 @@ const _sfc_main$b = defineComponent({
|
|
|
2747
2747
|
getParentSlots(null, "dt-theme").then((rsp) => {
|
|
2748
2748
|
slots.value = rsp;
|
|
2749
2749
|
});
|
|
2750
|
-
const getComputedTheme = computed(() => props.theme || unref
|
|
2751
|
-
const getComputedMenuMode = computed(() => props.menuMode || unref
|
|
2752
|
-
const getIsShowLogo = computed(() => unref
|
|
2750
|
+
const getComputedTheme = computed(() => props.theme || unref(getMenuTheme));
|
|
2751
|
+
const getComputedMenuMode = computed(() => props.menuMode || unref(getMenuMode));
|
|
2752
|
+
const getIsShowLogo = computed(() => unref(getShowLogo) && unref(getIsSidebarType));
|
|
2753
2753
|
const getUseScroll = computed(() => {
|
|
2754
|
-
return !unref
|
|
2754
|
+
return !unref(getIsHorizontal) && (unref(getIsSidebarType) || props.splitType === MenuSplitTye.LEFT || props.splitType === MenuSplitTye.NONE);
|
|
2755
2755
|
});
|
|
2756
|
-
const getLogoClass = computed(() => [`dt-menu-logo`, unref
|
|
2756
|
+
const getLogoClass = computed(() => [`dt-menu-logo`, unref(getComputedTheme)]);
|
|
2757
2757
|
const getMenuProps = computed(() => {
|
|
2758
|
-
const menus = unref
|
|
2758
|
+
const menus = unref(menusRef);
|
|
2759
2759
|
return {
|
|
2760
2760
|
menus,
|
|
2761
2761
|
beforeClickFn: beforeMenuClickFn,
|
|
2762
2762
|
items: menus,
|
|
2763
|
-
theme: unref
|
|
2764
|
-
collapse: unref
|
|
2765
|
-
collapsedShowTitle: unref
|
|
2763
|
+
theme: unref(getComputedTheme),
|
|
2764
|
+
collapse: unref(getCollapsed),
|
|
2765
|
+
collapsedShowTitle: unref(getCollapsedShowTitle),
|
|
2766
2766
|
onMenuClick: handleMenuClick
|
|
2767
2767
|
};
|
|
2768
2768
|
});
|
|
@@ -2778,30 +2778,30 @@ const _sfc_main$b = defineComponent({
|
|
|
2778
2778
|
go(path);
|
|
2779
2779
|
}
|
|
2780
2780
|
function renderHeader() {
|
|
2781
|
-
if (!unref
|
|
2781
|
+
if (!unref(getIsShowLogo))
|
|
2782
2782
|
return null;
|
|
2783
2783
|
if (slots.value?.logo) {
|
|
2784
2784
|
return createVNode(DtSlotContainer, {
|
|
2785
2785
|
"template": slots.value?.logo,
|
|
2786
2786
|
"data": {
|
|
2787
|
-
theme: unref
|
|
2788
|
-
collapsed: unref
|
|
2787
|
+
theme: unref(getComputedTheme),
|
|
2788
|
+
collapsed: unref(getCollapsed)
|
|
2789
2789
|
}
|
|
2790
2790
|
}, null);
|
|
2791
2791
|
}
|
|
2792
2792
|
return createVNode(_sfc_main$s, {
|
|
2793
|
-
"showTitle": !unref
|
|
2794
|
-
"class": unref
|
|
2795
|
-
"theme": unref
|
|
2793
|
+
"showTitle": !unref(getCollapsed),
|
|
2794
|
+
"class": unref(getLogoClass),
|
|
2795
|
+
"theme": unref(getComputedTheme)
|
|
2796
2796
|
}, null);
|
|
2797
2797
|
}
|
|
2798
2798
|
function renderFooter() {
|
|
2799
|
-
if (unref
|
|
2799
|
+
if (unref(getMenuType) === MenuType.SIDE || unref(getMenuType) === MenuType.MIX && props.splitType === 2) {
|
|
2800
2800
|
return slots.value?.menuFooter ? createVNode(DtSlotContainer, {
|
|
2801
2801
|
"template": slots.value?.menuFooter,
|
|
2802
2802
|
"data": {
|
|
2803
|
-
theme: unref
|
|
2804
|
-
collapsed: unref
|
|
2803
|
+
theme: unref(getComputedTheme),
|
|
2804
|
+
collapsed: unref(getCollapsed)
|
|
2805
2805
|
}
|
|
2806
2806
|
}, null) : null;
|
|
2807
2807
|
}
|
|
@@ -2811,19 +2811,19 @@ const _sfc_main$b = defineComponent({
|
|
|
2811
2811
|
const {
|
|
2812
2812
|
menus,
|
|
2813
2813
|
...menuProps
|
|
2814
|
-
} = unref
|
|
2814
|
+
} = unref(getMenuProps);
|
|
2815
2815
|
if (!menus || !menus.length)
|
|
2816
2816
|
return null;
|
|
2817
2817
|
return createVNode(_sfc_main$c, mergeProps(menuProps, {
|
|
2818
2818
|
"isHorizontal": props.isHorizontal,
|
|
2819
|
-
"type": unref
|
|
2820
|
-
"showLogo": unref
|
|
2821
|
-
"mode": unref
|
|
2819
|
+
"type": unref(getMenuType),
|
|
2820
|
+
"showLogo": unref(getIsShowLogo),
|
|
2821
|
+
"mode": unref(getComputedMenuMode),
|
|
2822
2822
|
"items": menus
|
|
2823
2823
|
}), null);
|
|
2824
2824
|
}
|
|
2825
2825
|
return () => {
|
|
2826
|
-
return createVNode(Fragment, null, [renderHeader(), unref
|
|
2826
|
+
return createVNode(Fragment, null, [renderHeader(), unref(getUseScroll) ? createVNode(DtScrollContainer, null, {
|
|
2827
2827
|
default: () => renderMenu()
|
|
2828
2828
|
}) : renderMenu(), renderFooter()]);
|
|
2829
2829
|
};
|
|
@@ -2860,14 +2860,14 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
2860
2860
|
} = useHeader();
|
|
2861
2861
|
const { getShowMultipleTab, getMultipleTabPosIsTop } = useMultipleTab();
|
|
2862
2862
|
const getSplitType = computed(() => {
|
|
2863
|
-
return unref
|
|
2863
|
+
return unref(getSplit) ? MenuSplitTye.TOP : MenuSplitTye.NONE;
|
|
2864
2864
|
});
|
|
2865
2865
|
const getMenuMode = computed(() => {
|
|
2866
|
-
return unref
|
|
2866
|
+
return unref(getSplit) ? MenuMode.HORIZONTAL : null;
|
|
2867
2867
|
});
|
|
2868
|
-
const getShowTab = computed(() => unref
|
|
2868
|
+
const getShowTab = computed(() => unref(getShowMultipleTab) && unref(getMultipleTabPosIsTop));
|
|
2869
2869
|
const getHeaderCls = computed(() => {
|
|
2870
|
-
let theme = unref
|
|
2870
|
+
let theme = unref(getHeaderTheme);
|
|
2871
2871
|
let cls = "dt-header flex p-0 items-center justify-between ";
|
|
2872
2872
|
if (props.fixed) {
|
|
2873
2873
|
cls += "fixed top-0 left-0 w-full z-10 ";
|
|
@@ -2878,52 +2878,52 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
2878
2878
|
return (_ctx, _cache) => {
|
|
2879
2879
|
const _component_ALayoutHeader = LayoutHeader;
|
|
2880
2880
|
return openBlock(), createBlock(_component_ALayoutHeader, {
|
|
2881
|
-
class: normalizeClass([unref
|
|
2881
|
+
class: normalizeClass([unref(getHeaderCls), "flex items-center justify-between"])
|
|
2882
2882
|
}, {
|
|
2883
2883
|
default: withCtx(() => [
|
|
2884
2884
|
createElementVNode("div", {
|
|
2885
2885
|
class: normalizeClass(["dt-header-left flex h-full items-center", {
|
|
2886
|
-
"w-0 flex-1": unref
|
|
2886
|
+
"w-0 flex-1": unref(getShowTab)
|
|
2887
2887
|
}])
|
|
2888
2888
|
}, [
|
|
2889
|
-
unref
|
|
2889
|
+
unref(getShowHeaderLogo) ? (openBlock(), createBlock(unref(_sfc_main$s), {
|
|
2890
2890
|
key: 0,
|
|
2891
|
-
theme: unref
|
|
2891
|
+
theme: unref(getHeaderTheme),
|
|
2892
2892
|
class: "dt-header-logo"
|
|
2893
2893
|
}, null, 8, ["theme"])) : createCommentVNode("", true),
|
|
2894
|
-
unref
|
|
2894
|
+
unref(getShowHeaderTrigger) && !unref(getSplit) && !unref(getShowTab) ? (openBlock(), createBlock(unref(_sfc_main$r), {
|
|
2895
2895
|
key: 1,
|
|
2896
|
-
theme: unref
|
|
2896
|
+
theme: unref(getHeaderTheme)
|
|
2897
2897
|
}, null, 8, ["theme"])) : createCommentVNode("", true),
|
|
2898
|
-
unref
|
|
2899
|
-
unref
|
|
2898
|
+
unref(getShowBread) && !unref(getShowTab) ? (openBlock(), createBlock(unref(_sfc_main$q), { key: 2 })) : createCommentVNode("", true),
|
|
2899
|
+
unref(getShowTab) ? (openBlock(), createElementBlock("div", _hoisted_1$5, [
|
|
2900
2900
|
createVNode(_sfc_main$x)
|
|
2901
2901
|
])) : createCommentVNode("", true)
|
|
2902
2902
|
], 2),
|
|
2903
|
-
unref
|
|
2903
|
+
unref(getShowTopMenu) ? (openBlock(), createElementBlock("div", _hoisted_2$3, [
|
|
2904
2904
|
createVNode(_sfc_main$b, {
|
|
2905
2905
|
isHorizontal: true,
|
|
2906
|
-
theme: unref
|
|
2907
|
-
splitType: unref
|
|
2908
|
-
menuMode: unref
|
|
2906
|
+
theme: unref(getHeaderTheme),
|
|
2907
|
+
splitType: unref(getSplitType),
|
|
2908
|
+
menuMode: unref(getMenuMode)
|
|
2909
2909
|
}, null, 8, ["theme", "splitType", "menuMode"])
|
|
2910
2910
|
])) : createCommentVNode("", true),
|
|
2911
2911
|
createElementVNode("div", {
|
|
2912
2912
|
class: "dt-header-action flex items-center",
|
|
2913
2913
|
style: normalizeStyle({
|
|
2914
|
-
"padding-right": unref
|
|
2914
|
+
"padding-right": unref(getShowSettingTheme) ? "" : "20px"
|
|
2915
2915
|
})
|
|
2916
2916
|
}, [
|
|
2917
|
-
unref
|
|
2918
|
-
unref
|
|
2919
|
-
unref
|
|
2920
|
-
unref
|
|
2921
|
-
unref
|
|
2917
|
+
unref(getShowSearch) ? (openBlock(), createBlock(unref(_sfc_main$p), { key: 0 })) : createCommentVNode("", true),
|
|
2918
|
+
unref(getShowNotice) ? (openBlock(), createBlock(unref(_sfc_main$n), { key: 1 })) : createCommentVNode("", true),
|
|
2919
|
+
unref(getShowUiSize) ? (openBlock(), createBlock(unref(_sfc_main$m), { key: 2 })) : createCommentVNode("", true),
|
|
2920
|
+
unref(getShowFullScreen) ? (openBlock(), createBlock(unref(_sfc_main$w), { key: 3 })) : createCommentVNode("", true),
|
|
2921
|
+
unref(getShowLocale) ? (openBlock(), createBlock(unref(_sfc_main$o), {
|
|
2922
2922
|
key: 4,
|
|
2923
2923
|
reload: true
|
|
2924
2924
|
})) : createCommentVNode("", true),
|
|
2925
|
-
createVNode(unref
|
|
2926
|
-
unref
|
|
2925
|
+
createVNode(unref(_sfc_main$l)),
|
|
2926
|
+
unref(getShowSettingTheme) ? (openBlock(), createBlock(unref(_sfc_main$g), { key: 5 })) : createCommentVNode("", true)
|
|
2927
2927
|
], 4)
|
|
2928
2928
|
]),
|
|
2929
2929
|
_: 1
|
|
@@ -2935,7 +2935,7 @@ function useMenuSwitch() {
|
|
|
2935
2935
|
const brokenRef = ref(false);
|
|
2936
2936
|
const { getMiniWidthNumber } = useMenu();
|
|
2937
2937
|
const getCollapsedWidth = computed(() => {
|
|
2938
|
-
return unref
|
|
2938
|
+
return unref(brokenRef) ? 0 : unref(getMiniWidthNumber);
|
|
2939
2939
|
});
|
|
2940
2940
|
function onBreakPointChange(broken) {
|
|
2941
2941
|
brokenRef.value = broken;
|
|
@@ -2945,11 +2945,11 @@ function useMenuSwitch() {
|
|
|
2945
2945
|
function useTrigger() {
|
|
2946
2946
|
const { getTrigger, getSplit } = useMenu();
|
|
2947
2947
|
const getShowTrigger = computed(() => {
|
|
2948
|
-
const trigger = unref
|
|
2949
|
-
return trigger && unref
|
|
2948
|
+
const trigger = unref(getTrigger);
|
|
2949
|
+
return trigger && unref(getSplit);
|
|
2950
2950
|
});
|
|
2951
2951
|
const getTriggerAttr = computed(() => {
|
|
2952
|
-
if (unref
|
|
2952
|
+
if (unref(getShowTrigger)) {
|
|
2953
2953
|
return {};
|
|
2954
2954
|
}
|
|
2955
2955
|
return {
|
|
@@ -2971,12 +2971,12 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
2971
2971
|
return (_ctx, _cache) => {
|
|
2972
2972
|
return openBlock(), createElementBlock("div", {
|
|
2973
2973
|
onClick: _cache[0] || (_cache[0] = withModifiers(
|
|
2974
|
-
(...args) => unref
|
|
2974
|
+
(...args) => unref(toggleCollapsed) && unref(toggleCollapsed)(...args),
|
|
2975
2975
|
["stop"]
|
|
2976
2976
|
))
|
|
2977
2977
|
}, [
|
|
2978
2978
|
createElementVNode("i", {
|
|
2979
|
-
class: normalizeClass(["i", unref
|
|
2979
|
+
class: normalizeClass(["i", unref(getCollapsed) ? "ant-design:double-right-outlined" : "ant-design:double-left-outlined"])
|
|
2980
2980
|
}, null, 2)
|
|
2981
2981
|
]);
|
|
2982
2982
|
};
|
|
@@ -2987,8 +2987,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
2987
2987
|
setup(__props) {
|
|
2988
2988
|
const { getCollapsed, getCanDrag, getMenuWidth } = useMenu();
|
|
2989
2989
|
const getDragBarStyle = computed(() => {
|
|
2990
|
-
if (!unref
|
|
2991
|
-
return { left: `${unref
|
|
2990
|
+
if (!unref(getCollapsed)) {
|
|
2991
|
+
return { left: `${unref(getMenuWidth)}px` };
|
|
2992
2992
|
}
|
|
2993
2993
|
return {};
|
|
2994
2994
|
});
|
|
@@ -2996,14 +2996,14 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
2996
2996
|
return [
|
|
2997
2997
|
"dt-darg-bar",
|
|
2998
2998
|
{
|
|
2999
|
-
"dt-darg-bar--hide": !unref
|
|
2999
|
+
"dt-darg-bar--hide": !unref(getCanDrag)
|
|
3000
3000
|
}
|
|
3001
3001
|
];
|
|
3002
3002
|
});
|
|
3003
3003
|
return (_ctx, _cache) => {
|
|
3004
3004
|
return openBlock(), createElementBlock("div", {
|
|
3005
|
-
class: normalizeClass(unref
|
|
3006
|
-
style: normalizeStyle(unref
|
|
3005
|
+
class: normalizeClass(unref(getClass)),
|
|
3006
|
+
style: normalizeStyle(unref(getDragBarStyle))
|
|
3007
3007
|
}, null, 6);
|
|
3008
3008
|
};
|
|
3009
3009
|
}
|
|
@@ -3028,11 +3028,11 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
3028
3028
|
const activeId = ref(null);
|
|
3029
3029
|
const activePath = ref(null);
|
|
3030
3030
|
const subMenus = ref([]);
|
|
3031
|
-
const getDomStyle = computed(() => setDomWidth(`${unref
|
|
3031
|
+
const getDomStyle = computed(() => setDomWidth(`${unref(subMenus)?.length ? unref(getMenuWidth) : MENU_WIDTH}px`));
|
|
3032
3032
|
const getWrapStyle = computed(() => setDomWidth(`${MENU_WIDTH}px`));
|
|
3033
3033
|
const getSubMenuStyle = computed(() => {
|
|
3034
3034
|
return {
|
|
3035
|
-
width: `${unref
|
|
3035
|
+
width: `${unref(getMenuWidth) - MENU_WIDTH}px`,
|
|
3036
3036
|
left: `${MENU_WIDTH}px`
|
|
3037
3037
|
};
|
|
3038
3038
|
});
|
|
@@ -3047,11 +3047,11 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
3047
3047
|
}
|
|
3048
3048
|
const getMenuEvents = {
|
|
3049
3049
|
onMouseleave: () => {
|
|
3050
|
-
setActive(unref
|
|
3050
|
+
setActive(unref(activePath));
|
|
3051
3051
|
}
|
|
3052
3052
|
};
|
|
3053
3053
|
const getItemEvents = (item) => {
|
|
3054
|
-
if (unref
|
|
3054
|
+
if (unref(getMixSideTrigger) === "hover") {
|
|
3055
3055
|
return {
|
|
3056
3056
|
onMouseenter: () => handleModuleClick(item.url, true),
|
|
3057
3057
|
onClick: () => handleModuleClick(item.url)
|
|
@@ -3077,28 +3077,28 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
3077
3077
|
watchEffect(() => {
|
|
3078
3078
|
if (!currentRoute || currentRoute.value.path === "/")
|
|
3079
3079
|
return;
|
|
3080
|
-
const { meta, path } = unref
|
|
3080
|
+
const { meta, path } = unref(currentRoute);
|
|
3081
3081
|
activePath.value = meta?.currentActiveMenu || path;
|
|
3082
|
-
setActive(unref
|
|
3082
|
+
setActive(unref(activePath));
|
|
3083
3083
|
});
|
|
3084
3084
|
return (_ctx, _cache) => {
|
|
3085
3085
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
3086
3086
|
createElementVNode("div", {
|
|
3087
3087
|
class: "h-full overflow-hidden",
|
|
3088
|
-
style: normalizeStyle(unref
|
|
3088
|
+
style: normalizeStyle(unref(getDomStyle))
|
|
3089
3089
|
}, null, 4),
|
|
3090
3090
|
createElementVNode("div", mergeProps({
|
|
3091
|
-
style: unref
|
|
3092
|
-
class: ["dt-mix-sider fixed top-0 left-0 h-full overflow-hidden", unref
|
|
3091
|
+
style: unref(getWrapStyle),
|
|
3092
|
+
class: ["dt-mix-sider fixed top-0 left-0 h-full overflow-hidden", unref(getMenuTheme)]
|
|
3093
3093
|
}, getMenuEvents), [
|
|
3094
3094
|
createVNode(_sfc_main$s, {
|
|
3095
3095
|
showTitle: false,
|
|
3096
3096
|
class: normalizeClass("justify-center z-10")
|
|
3097
3097
|
}),
|
|
3098
|
-
createVNode(unref
|
|
3098
|
+
createVNode(unref(DtScrollContainer), { class: "z-10" }, {
|
|
3099
3099
|
default: withCtx(() => [
|
|
3100
3100
|
createElementVNode("ul", _hoisted_1$4, [
|
|
3101
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref
|
|
3101
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(menuModules), (item) => {
|
|
3102
3102
|
return openBlock(), createElementBlock("li", mergeProps({
|
|
3103
3103
|
key: item.id,
|
|
3104
3104
|
class: ["py-3 cursor-pointer relative text-center", {
|
|
@@ -3120,9 +3120,9 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
3120
3120
|
subMenus.value?.length ? (openBlock(), createElementBlock("div", {
|
|
3121
3121
|
key: 0,
|
|
3122
3122
|
class: "fixed top-0 h-full sub-menu bg-white",
|
|
3123
|
-
style: normalizeStyle(unref
|
|
3123
|
+
style: normalizeStyle(unref(getSubMenuStyle))
|
|
3124
3124
|
}, [
|
|
3125
|
-
createVNode(unref
|
|
3125
|
+
createVNode(unref(DtScrollContainer), null, {
|
|
3126
3126
|
default: withCtx(() => [
|
|
3127
3127
|
createElementVNode("ul", _hoisted_3$2, [
|
|
3128
3128
|
(openBlock(true), createElementBlock(Fragment, null, renderList(subMenus.value, (menu) => {
|
|
@@ -3138,7 +3138,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
3138
3138
|
class: normalizeClass(["flex cursor-pointer", {
|
|
3139
3139
|
"active-menu": subMenu.url === activePath.value
|
|
3140
3140
|
}]),
|
|
3141
|
-
onClick: ($event) => unref
|
|
3141
|
+
onClick: ($event) => unref(go)(subMenu.url)
|
|
3142
3142
|
}, [
|
|
3143
3143
|
createElementVNode("i", {
|
|
3144
3144
|
class: normalizeClass(["i opacity-50 pr-2", subMenu.icon])
|
|
@@ -3152,7 +3152,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
3152
3152
|
class: normalizeClass(["sub-menu flex cursor-pointer", {
|
|
3153
3153
|
"active-menu": menu.url === activePath.value
|
|
3154
3154
|
}]),
|
|
3155
|
-
onClick: ($event) => unref
|
|
3155
|
+
onClick: ($event) => unref(go)(menu.url)
|
|
3156
3156
|
}, [
|
|
3157
3157
|
createElementVNode("i", {
|
|
3158
3158
|
class: normalizeClass(["i opacity-50 pr-2", menu.icon])
|
|
@@ -3199,7 +3199,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3199
3199
|
const dragBarRef = ref(null);
|
|
3200
3200
|
const sideRef = ref(null);
|
|
3201
3201
|
const hiddenDomStyle = computed(() => {
|
|
3202
|
-
const width = `${unref
|
|
3202
|
+
const width = `${unref(getRealWidth)}px`;
|
|
3203
3203
|
return {
|
|
3204
3204
|
width,
|
|
3205
3205
|
overflow: "hidden",
|
|
@@ -3213,60 +3213,60 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3213
3213
|
const {
|
|
3214
3214
|
menusRef
|
|
3215
3215
|
} = useSplitMenu(getSplitType);
|
|
3216
|
-
if (!unref
|
|
3216
|
+
if (!unref(menusRef)?.length)
|
|
3217
3217
|
return false;
|
|
3218
|
-
return unref
|
|
3218
|
+
return unref(getSplit) ? !unref(getMenuHidden) : true;
|
|
3219
3219
|
});
|
|
3220
3220
|
useDragLine(sideRef, dragBarRef);
|
|
3221
3221
|
const getSiderClass = computed(() => {
|
|
3222
3222
|
let cls = `dt-sideBar overflow-hidden z-10 `;
|
|
3223
|
-
if (unref
|
|
3223
|
+
if (unref(getMenuFixed)) {
|
|
3224
3224
|
cls += `dt-sideBar--fixed t-0 l-0 h-full `;
|
|
3225
3225
|
}
|
|
3226
|
-
if (unref
|
|
3226
|
+
if (unref(getIsMixMode)) {
|
|
3227
3227
|
cls += "dt-sideBar--mix ";
|
|
3228
3228
|
}
|
|
3229
3229
|
return cls;
|
|
3230
3230
|
});
|
|
3231
3231
|
const getSplitType = computed(() => {
|
|
3232
|
-
return unref
|
|
3232
|
+
return unref(getSplit) ? MenuSplitTye.LEFT : MenuSplitTye.NONE;
|
|
3233
3233
|
});
|
|
3234
3234
|
const getMode = computed(() => {
|
|
3235
|
-
return unref
|
|
3235
|
+
return unref(getSplit) ? MenuMode.INLINE : null;
|
|
3236
3236
|
});
|
|
3237
3237
|
const renderTrigger = h(_sfc_main$9);
|
|
3238
3238
|
return (_ctx, _cache) => {
|
|
3239
3239
|
const _component_ALayoutSider = LayoutSider;
|
|
3240
|
-
return unref
|
|
3240
|
+
return unref(getIsMixSidebar) ? (openBlock(), createBlock(_sfc_main$7, {
|
|
3241
3241
|
key: 0
|
|
3242
3242
|
})) : (openBlock(), createElementBlock(Fragment, {
|
|
3243
3243
|
key: 1
|
|
3244
|
-
}, [unref
|
|
3244
|
+
}, [unref(getMenuFixed) ? withDirectives((openBlock(), createElementBlock("div", {
|
|
3245
3245
|
key: 0,
|
|
3246
|
-
style: normalizeStyle(unref
|
|
3247
|
-
}, null, 4)), [[vShow, unref
|
|
3246
|
+
style: normalizeStyle(unref(hiddenDomStyle))
|
|
3247
|
+
}, null, 4)), [[vShow, unref(showClassSideBarRef)]]) : createCommentVNode("", true), withDirectives(createVNode(_component_ALayoutSider, mergeProps({
|
|
3248
3248
|
ref_key: "sideRef",
|
|
3249
3249
|
ref: sideRef,
|
|
3250
3250
|
collapsible: "",
|
|
3251
3251
|
breakpoint: "lg",
|
|
3252
|
-
class: unref
|
|
3253
|
-
width: unref
|
|
3254
|
-
collapsed: unref
|
|
3255
|
-
collapsedWidth: unref
|
|
3256
|
-
onBreakpoint: unref
|
|
3257
|
-
theme: unref
|
|
3258
|
-
trigger: unref
|
|
3259
|
-
}, unref
|
|
3252
|
+
class: unref(getSiderClass),
|
|
3253
|
+
width: unref(getMenuWidth),
|
|
3254
|
+
collapsed: unref(getCollapsed),
|
|
3255
|
+
collapsedWidth: unref(getCollapsedWidth),
|
|
3256
|
+
onBreakpoint: unref(onBreakPointChange),
|
|
3257
|
+
theme: unref(getMenuTheme),
|
|
3258
|
+
trigger: unref(renderTrigger)
|
|
3259
|
+
}, unref(getTriggerAttr)), {
|
|
3260
3260
|
default: withCtx(() => [createVNode(_sfc_main$b, {
|
|
3261
|
-
theme: unref
|
|
3262
|
-
menuMode: unref
|
|
3263
|
-
splitType: unref
|
|
3261
|
+
theme: unref(getMenuTheme),
|
|
3262
|
+
menuMode: unref(getMode),
|
|
3263
|
+
splitType: unref(getSplitType)
|
|
3264
3264
|
}, null, 8, ["theme", "menuMode", "splitType"]), createVNode(_sfc_main$8, {
|
|
3265
3265
|
ref_key: "dragBarRef",
|
|
3266
3266
|
ref: dragBarRef
|
|
3267
3267
|
}, null, 512)]),
|
|
3268
3268
|
_: 1
|
|
3269
|
-
}, 16, ["class", "width", "collapsed", "collapsedWidth", "onBreakpoint", "theme", "trigger"]), [[vShow, unref
|
|
3269
|
+
}, 16, ["class", "width", "collapsed", "collapsedWidth", "onBreakpoint", "theme", "trigger"]), [[vShow, unref(showClassSideBarRef)]])], 64));
|
|
3270
3270
|
};
|
|
3271
3271
|
}
|
|
3272
3272
|
});
|
|
@@ -3283,50 +3283,50 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3283
3283
|
const { getCalcContentWidth, getIsMixMode, getSplit, getIsMixSidebar } = useMenu();
|
|
3284
3284
|
const { getShowMultipleTab, getMultipleTabPosIsTop } = useMultipleTab();
|
|
3285
3285
|
const getPlaceholderDomStyle = computed(() => {
|
|
3286
|
-
let height = unref
|
|
3287
|
-
if (unref
|
|
3288
|
-
height = unref
|
|
3286
|
+
let height = unref(getHeaderHeight);
|
|
3287
|
+
if (unref(getIsMixMode)) {
|
|
3288
|
+
height = unref(getShowMultipleTab) ? unref(getTabsHeight) : 0;
|
|
3289
3289
|
}
|
|
3290
3290
|
return {
|
|
3291
3291
|
height: `${height}px`
|
|
3292
3292
|
};
|
|
3293
3293
|
});
|
|
3294
3294
|
const getSplitType = computed(() => {
|
|
3295
|
-
return unref
|
|
3295
|
+
return unref(getSplit) ? MenuSplitTye.LEFT : MenuSplitTye.NONE;
|
|
3296
3296
|
});
|
|
3297
3297
|
const { menusRef } = useSplitMenu(getSplitType);
|
|
3298
3298
|
const getWrapStyle = computed(() => {
|
|
3299
3299
|
const style = {};
|
|
3300
|
-
if (unref
|
|
3301
|
-
style.width = useThemeStore().getMixSiderIsHasMenu ? unref
|
|
3302
|
-
} else if (unref
|
|
3300
|
+
if (unref(getIsMixSidebar)) {
|
|
3301
|
+
style.width = useThemeStore().getMixSiderIsHasMenu ? unref(getCalcContentWidth) : "calc(100% - 80px)";
|
|
3302
|
+
} else if (unref(getSplit) && !unref(menusRef)?.length) {
|
|
3303
3303
|
style.width = "100%";
|
|
3304
|
-
} else if (unref
|
|
3305
|
-
style.width = unref
|
|
3304
|
+
} else if (unref(getFixed)) {
|
|
3305
|
+
style.width = unref(getCalcContentWidth);
|
|
3306
3306
|
}
|
|
3307
|
-
if (unref
|
|
3307
|
+
if (unref(getShowFullHeaderRef))
|
|
3308
3308
|
style.top = "48px";
|
|
3309
3309
|
return style;
|
|
3310
3310
|
});
|
|
3311
3311
|
const getClass = computed(() => {
|
|
3312
3312
|
let cls = "transition-width duration-200 flex-auto";
|
|
3313
|
-
if (unref
|
|
3313
|
+
if (unref(getFixed)) {
|
|
3314
3314
|
cls += " fixed top-0 right-0 w-full";
|
|
3315
3315
|
}
|
|
3316
3316
|
return cls;
|
|
3317
3317
|
});
|
|
3318
3318
|
return (_ctx, _cache) => {
|
|
3319
3319
|
return openBlock(), createElementBlock("div", null, [
|
|
3320
|
-
unref
|
|
3320
|
+
unref(getFixed) ? (openBlock(), createElementBlock("div", {
|
|
3321
3321
|
key: 0,
|
|
3322
|
-
style: normalizeStyle(unref
|
|
3322
|
+
style: normalizeStyle(unref(getPlaceholderDomStyle))
|
|
3323
3323
|
}, null, 4)) : createCommentVNode("", true),
|
|
3324
3324
|
createElementVNode("div", {
|
|
3325
|
-
style: normalizeStyle(unref
|
|
3326
|
-
class: normalizeClass(unref
|
|
3325
|
+
style: normalizeStyle(unref(getWrapStyle)),
|
|
3326
|
+
class: normalizeClass(unref(getClass))
|
|
3327
3327
|
}, [
|
|
3328
|
-
unref
|
|
3329
|
-
unref
|
|
3328
|
+
unref(getShowInsetHeaderRef) ? (openBlock(), createBlock(_sfc_main$a, { key: 0 })) : createCommentVNode("", true),
|
|
3329
|
+
unref(getShowMultipleTab) && !unref(getMultipleTabPosIsTop) ? (openBlock(), createBlock(_sfc_main$x, { key: 1 })) : createCommentVNode("", true)
|
|
3330
3330
|
], 6)
|
|
3331
3331
|
]);
|
|
3332
3332
|
};
|
|
@@ -3337,7 +3337,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3337
3337
|
__name: "index",
|
|
3338
3338
|
setup(__props) {
|
|
3339
3339
|
const { getFooter } = useTheme();
|
|
3340
|
-
const { title, subTitle, height } = unref
|
|
3340
|
+
const { title, subTitle, height } = unref(getFooter);
|
|
3341
3341
|
const footerOptions = computed(() => {
|
|
3342
3342
|
return {
|
|
3343
3343
|
lineHeight: `${height - 1}px`,
|
|
@@ -3348,13 +3348,13 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3348
3348
|
};
|
|
3349
3349
|
});
|
|
3350
3350
|
return (_ctx, _cache) => {
|
|
3351
|
-
return openBlock(), createBlock(unref
|
|
3351
|
+
return openBlock(), createBlock(unref(LayoutFooter), {
|
|
3352
3352
|
class: "text-center p-0 w-full block border-t border-gray-200",
|
|
3353
|
-
style: normalizeStyle(unref
|
|
3353
|
+
style: normalizeStyle(unref(footerOptions))
|
|
3354
3354
|
}, {
|
|
3355
3355
|
default: withCtx(() => [
|
|
3356
|
-
createElementVNode("span", _hoisted_1$3, toDisplayString(unref
|
|
3357
|
-
createElementVNode("span", null, toDisplayString(unref
|
|
3356
|
+
createElementVNode("span", _hoisted_1$3, toDisplayString(unref(title)), 1),
|
|
3357
|
+
createElementVNode("span", null, toDisplayString(unref(subTitle)), 1)
|
|
3358
3358
|
]),
|
|
3359
3359
|
_: 1
|
|
3360
3360
|
}, 8, ["style"]);
|
|
@@ -3370,9 +3370,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3370
3370
|
const { getCanCache } = useMultipleTab();
|
|
3371
3371
|
const tabStore = useRouteReuseStore();
|
|
3372
3372
|
const { currentRoute } = useRouter();
|
|
3373
|
-
const contentMode = computed(() => unref
|
|
3373
|
+
const contentMode = computed(() => unref(currentRoute).meta.contentMode || unref(getLayoutContentMode));
|
|
3374
3374
|
function getTransitionName(route) {
|
|
3375
|
-
return route.meta.transitionName || unref
|
|
3375
|
+
return route.meta.transitionName || unref(getTransitionMode);
|
|
3376
3376
|
}
|
|
3377
3377
|
const getCaches = computed(() => {
|
|
3378
3378
|
return tabStore.getCachedTabList;
|
|
@@ -3382,8 +3382,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3382
3382
|
const _component_ALayoutContent = LayoutContent;
|
|
3383
3383
|
return openBlock(), createElementBlock("div", {
|
|
3384
3384
|
id: "dt-layout-content",
|
|
3385
|
-
class: normalizeClass([["dt-layout-content", unref
|
|
3386
|
-
loading: unref
|
|
3385
|
+
class: normalizeClass([["dt-layout-content", unref(contentMode)], "relative flex-auto overflow-x-hidden min-h-0 flex"]),
|
|
3386
|
+
loading: unref(getPageLoading) && unref(getOpenPageLoading)
|
|
3387
3387
|
}, [
|
|
3388
3388
|
createVNode(_component_ALayoutContent, null, {
|
|
3389
3389
|
default: withCtx(() => [
|
|
@@ -3395,9 +3395,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3395
3395
|
appear: ""
|
|
3396
3396
|
}, {
|
|
3397
3397
|
default: withCtx(() => [
|
|
3398
|
-
!route.meta.hideTab && unref
|
|
3398
|
+
!route.meta.hideTab && unref(getCanCache) ? (openBlock(), createBlock(KeepAlive, {
|
|
3399
3399
|
key: 0,
|
|
3400
|
-
include: unref
|
|
3400
|
+
include: unref(getCaches)
|
|
3401
3401
|
}, [
|
|
3402
3402
|
(openBlock(), createBlock(resolveDynamicComponent(Component), {
|
|
3403
3403
|
key: route.path
|
|
@@ -3637,17 +3637,17 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3637
3637
|
])
|
|
3638
3638
|
]),
|
|
3639
3639
|
createVNode(_sfc_main$2, {
|
|
3640
|
-
battery: unref
|
|
3641
|
-
"battery-status": unref
|
|
3642
|
-
"calc-discharging-time": unref
|
|
3643
|
-
"calc-charging-time": unref
|
|
3640
|
+
battery: unref(battery),
|
|
3641
|
+
"battery-status": unref(batteryStatus),
|
|
3642
|
+
"calc-discharging-time": unref(calcDischargingTime),
|
|
3643
|
+
"calc-charging-time": unref(calcChargingTime)
|
|
3644
3644
|
}, null, 8, ["battery", "battery-status", "calc-discharging-time", "calc-charging-time"])
|
|
3645
3645
|
], 64)) : (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
3646
|
-
unref
|
|
3646
|
+
unref(slots)?.icon ? (openBlock(), createBlock(unref(DtSlotContainer$1), {
|
|
3647
3647
|
key: 0,
|
|
3648
|
-
template: unref
|
|
3648
|
+
template: unref(slots).icon
|
|
3649
3649
|
}, null, 8, ["template"])) : createCommentVNode("", true),
|
|
3650
|
-
createElementVNode("span", _hoisted_6, toDisplayString(unref
|
|
3650
|
+
createElementVNode("span", _hoisted_6, toDisplayString(unref(getUserInfo)?.userNo), 1),
|
|
3651
3651
|
createVNode(_component_AInputPassword, {
|
|
3652
3652
|
class: "mt-2",
|
|
3653
3653
|
autofocus: "",
|
|
@@ -3665,12 +3665,12 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3665
3665
|
])
|
|
3666
3666
|
])),
|
|
3667
3667
|
createElementVNode("div", _hoisted_8, [
|
|
3668
|
-
createElementVNode("div", _hoisted_9, toDisplayString(unref
|
|
3669
|
-
createElementVNode("div", _hoisted_10, toDisplayString(unref
|
|
3668
|
+
createElementVNode("div", _hoisted_9, toDisplayString(unref(hour)) + ":" + toDisplayString(unref(minute)), 1),
|
|
3669
|
+
createElementVNode("div", _hoisted_10, toDisplayString(unref(month)) + "\u6708" + toDisplayString(unref(date)) + "\u53F7\uFF0C\u661F\u671F" + toDisplayString(unref(week)), 1)
|
|
3670
3670
|
]),
|
|
3671
3671
|
createElementVNode("div", _hoisted_11, [
|
|
3672
3672
|
createElementVNode("span", {
|
|
3673
|
-
class: normalizeClass([{ offline: !unref
|
|
3673
|
+
class: normalizeClass([{ offline: !unref(online) }, "network"])
|
|
3674
3674
|
}, _hoisted_13, 2),
|
|
3675
3675
|
_hoisted_14
|
|
3676
3676
|
])
|
|
@@ -3685,31 +3685,31 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3685
3685
|
const { getShowFullHeaderRef, getIsZH, getHeaderHeight, getUiSize, getLockscreen } = useHeader();
|
|
3686
3686
|
const { getSplit, getShowMenu, getShowSidebar, getIsMixSidebar } = useMenu();
|
|
3687
3687
|
const { getFooter, getShowFooter } = useTheme();
|
|
3688
|
-
const { height } = unref
|
|
3689
|
-
dayjs.locale(unref
|
|
3688
|
+
const { height } = unref(getFooter);
|
|
3689
|
+
dayjs.locale(unref(getIsZH) ? "zh-cn" : "en");
|
|
3690
3690
|
const useLockscreen = useLockscreenStore();
|
|
3691
3691
|
const isLock = computed(() => useLockscreen.isLock);
|
|
3692
3692
|
const layoutClass = computed(() => {
|
|
3693
3693
|
let cls = "ant-layout";
|
|
3694
|
-
if (unref
|
|
3694
|
+
if (unref(getIsMixSidebar)) {
|
|
3695
3695
|
cls += " ant-layout-has-sider";
|
|
3696
3696
|
}
|
|
3697
|
-
if (unref
|
|
3697
|
+
if (unref(getShowMenu)) {
|
|
3698
3698
|
cls += " flex flex-auto min-h-0 flex-row";
|
|
3699
3699
|
}
|
|
3700
3700
|
return cls;
|
|
3701
3701
|
});
|
|
3702
3702
|
const layoutOption = computed(() => {
|
|
3703
|
-
if (unref
|
|
3703
|
+
if (unref(getSplit)) {
|
|
3704
3704
|
return {
|
|
3705
|
-
paddingTop: unref
|
|
3705
|
+
paddingTop: unref(getHeaderHeight) + "px",
|
|
3706
3706
|
background: "#f0f2f5"
|
|
3707
3707
|
};
|
|
3708
3708
|
}
|
|
3709
3709
|
});
|
|
3710
3710
|
const getContentStyle = computed(() => {
|
|
3711
3711
|
return {
|
|
3712
|
-
flex: unref
|
|
3712
|
+
flex: unref(getSplit) ? `0 0 calc(100% - ${unref(getShowFooter) || 0}px)` : `0 0 calc(100% - ${unref(getShowFooter) ? height : 0}px - ${unref(getHeaderHeight)}px)`,
|
|
3713
3713
|
overflowY: "auto"
|
|
3714
3714
|
};
|
|
3715
3715
|
});
|
|
@@ -3734,37 +3734,37 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3734
3734
|
const _component_ALayout = Layout;
|
|
3735
3735
|
const _component_AConfigProvider = ConfigProvider;
|
|
3736
3736
|
return openBlock(), createElementBlock("div", {
|
|
3737
|
-
class: normalizeClass(["dt-theme w-full h-full", `dt-theme-${unref
|
|
3737
|
+
class: normalizeClass(["dt-theme w-full h-full", `dt-theme-${unref(getUiSize)}`])
|
|
3738
3738
|
}, [
|
|
3739
|
-
!unref
|
|
3739
|
+
!unref(isLock) ? (openBlock(), createBlock(_component_AConfigProvider, {
|
|
3740
3740
|
key: 0,
|
|
3741
|
-
locale: unref
|
|
3742
|
-
"component-size": unref
|
|
3741
|
+
locale: unref(getIsZH) ? unref(zhCN) : unref(en),
|
|
3742
|
+
"component-size": unref(getUiSize)
|
|
3743
3743
|
}, {
|
|
3744
3744
|
default: withCtx(() => [
|
|
3745
|
-
unref
|
|
3745
|
+
unref(currentRoute)?.name && unref(currentRoute).meta?.requiresAuth !== false ? (openBlock(), createBlock(_component_ALayout, {
|
|
3746
3746
|
key: 0,
|
|
3747
3747
|
class: "w-full h-full flex"
|
|
3748
3748
|
}, {
|
|
3749
3749
|
default: withCtx(() => [
|
|
3750
3750
|
createVNode(_sfc_main$A),
|
|
3751
|
-
unref
|
|
3751
|
+
unref(getShowFullHeaderRef) ? (openBlock(), createBlock(_sfc_main$a, {
|
|
3752
3752
|
key: 0,
|
|
3753
3753
|
fixed: ""
|
|
3754
3754
|
})) : createCommentVNode("", true),
|
|
3755
3755
|
createVNode(_component_ALayout, {
|
|
3756
|
-
class: normalizeClass(unref
|
|
3757
|
-
style: normalizeStyle(unref
|
|
3756
|
+
class: normalizeClass(unref(layoutClass)),
|
|
3757
|
+
style: normalizeStyle(unref(layoutOption))
|
|
3758
3758
|
}, {
|
|
3759
3759
|
default: withCtx(() => [
|
|
3760
|
-
unref
|
|
3760
|
+
unref(getShowSidebar) ? (openBlock(), createBlock(_sfc_main$6, { key: 0 })) : createCommentVNode("", true),
|
|
3761
3761
|
createVNode(_component_ALayout, { class: "dt-theme-main flex w-full h-ful transition-width duration-200" }, {
|
|
3762
3762
|
default: withCtx(() => [
|
|
3763
3763
|
createVNode(_sfc_main$5),
|
|
3764
3764
|
createVNode(_sfc_main$3, {
|
|
3765
|
-
style: normalizeStyle(unref
|
|
3765
|
+
style: normalizeStyle(unref(getContentStyle))
|
|
3766
3766
|
}, null, 8, ["style"]),
|
|
3767
|
-
unref
|
|
3767
|
+
unref(getFooter) && unref(getFooter)["show"] ? (openBlock(), createBlock(_sfc_main$4, { key: 0 })) : createCommentVNode("", true)
|
|
3768
3768
|
]),
|
|
3769
3769
|
_: 1
|
|
3770
3770
|
})
|
|
@@ -3773,16 +3773,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3773
3773
|
}, 8, ["class", "style"])
|
|
3774
3774
|
]),
|
|
3775
3775
|
_: 1
|
|
3776
|
-
})) : (openBlock(), createBlock(unref
|
|
3776
|
+
})) : (openBlock(), createBlock(unref(RouterView), { key: 1 }))
|
|
3777
3777
|
]),
|
|
3778
3778
|
_: 1
|
|
3779
3779
|
}, 8, ["locale", "component-size"])) : createCommentVNode("", true),
|
|
3780
|
-
unref
|
|
3780
|
+
unref(getLockscreen) && unref(isLock) && unref(currentRoute)?.name && unref(currentRoute).meta?.requiresAuth !== false ? (openBlock(), createBlock(Transition, {
|
|
3781
3781
|
key: 1,
|
|
3782
3782
|
name: "fade-slide"
|
|
3783
3783
|
}, {
|
|
3784
3784
|
default: withCtx(() => [
|
|
3785
|
-
createVNode(unref
|
|
3785
|
+
createVNode(unref(_sfc_main$1))
|
|
3786
3786
|
]),
|
|
3787
3787
|
_: 1
|
|
3788
3788
|
})) : createCommentVNode("", true)
|
|
@@ -3940,7 +3940,7 @@ const ZH = {
|
|
|
3940
3940
|
"NUMBER": "\u5E8F\u53F7",
|
|
3941
3941
|
"ACTIONS": "\u64CD\u4F5C",
|
|
3942
3942
|
"TOTAL_PAGE": "\u603B\u5171{total}\u6761",
|
|
3943
|
-
"FILTER": "\
|
|
3943
|
+
"FILTER": "\u641C\u7D22",
|
|
3944
3944
|
"EXPAND_ALL": "\u5C55\u5F00\u5168\u90E8",
|
|
3945
3945
|
"COLLAPSE_ALL": "\u6298\u53E0\u5168\u90E8",
|
|
3946
3946
|
"SELECT_ALL1": "\u9009\u62E9\u5168\u90E8",
|