@dt-frames/ui 2.0.15 → 2.0.17
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 +75 -40
- package/es/components/form/index.less +16 -0
- package/es/components/form/src/props.d.ts +3 -3
- 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 +61 -134
- package/es/components/table/index.less +25 -0
- package/es/components/table/src/components/editTable/EditTableCell.d.ts +1 -0
- package/es/components/table/src/index.d.ts +0 -10
- package/es/components/table/src/props.d.ts +0 -4
- package/es/components/table/src/types/table.type.d.ts +8 -0
- package/es/components/tree/index.js +203 -89
- package/es/components/tree/index.less +88 -13
- package/es/components/tree/src/basicProps.d.ts +55 -11
- package/es/components/tree/src/components/ContextMenu.d.ts +6 -0
- 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 +131 -40
- package/es/components/tree/src/type/menu.d.ts +3 -0
- package/es/components/tree/src/type/tree.d.ts +0 -1
- package/es/components/upload/index.js +112 -65
- package/es/components/upload/index.less +17 -1
- package/es/components/upload/src/components/WordView.d.ts +1 -0
- package/es/components/upload/src/index.d.ts +2 -1
- package/es/components/upload/src/utils/upload.d.ts +1 -1
- package/es/theme/index.js +314 -309
- 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(() => {
|
|
@@ -546,14 +546,19 @@ function getBreadCrumb(path, menus) {
|
|
|
546
546
|
}
|
|
547
547
|
function getFilterMenu(filter = "", flag = false) {
|
|
548
548
|
let _menus = [];
|
|
549
|
+
const { getIsZH } = useHeader();
|
|
549
550
|
if (!trim(filter) && !flag)
|
|
550
551
|
return _menus;
|
|
551
552
|
let getTargetMenus = (menusArr) => {
|
|
552
553
|
menusArr.forEach((menu) => {
|
|
553
554
|
if (menu.children && menu.children.length) {
|
|
554
555
|
getTargetMenus(menu.children);
|
|
555
|
-
} else
|
|
556
|
-
|
|
556
|
+
} else {
|
|
557
|
+
let flabel = unref(getIsZH) ? menu.label : menu.enLabel?.toLowerCase();
|
|
558
|
+
let ffilter = unref(getIsZH) ? filter : filter.toLowerCase();
|
|
559
|
+
if (flabel.indexOf(ffilter) !== -1 || flag && !trim(filter)) {
|
|
560
|
+
_menus.push(menu);
|
|
561
|
+
}
|
|
557
562
|
}
|
|
558
563
|
});
|
|
559
564
|
};
|
|
@@ -621,20 +626,20 @@ function useDragLine(siderRef, dragBarRef) {
|
|
|
621
626
|
});
|
|
622
627
|
});
|
|
623
628
|
function getEl(elRef) {
|
|
624
|
-
const el = unref
|
|
629
|
+
const el = unref(elRef);
|
|
625
630
|
if (!el)
|
|
626
631
|
return null;
|
|
627
632
|
if (Reflect.has(el, "$el")) {
|
|
628
|
-
return unref
|
|
633
|
+
return unref(elRef)?.$el;
|
|
629
634
|
}
|
|
630
|
-
return unref
|
|
635
|
+
return unref(elRef);
|
|
631
636
|
}
|
|
632
637
|
function handleMouseMove(ele, wrap, clientX) {
|
|
633
638
|
document.onmousemove = function(innerE) {
|
|
634
639
|
innerE = innerE || window.event;
|
|
635
640
|
let iT = ele.left + (innerE.clientX - clientX);
|
|
636
641
|
const maxT = 800;
|
|
637
|
-
const minT = unref
|
|
642
|
+
const minT = unref(getMiniWidthNumber);
|
|
638
643
|
iT < 0 && (iT = 0);
|
|
639
644
|
iT > maxT && (iT = maxT);
|
|
640
645
|
iT < minT && (iT = minT);
|
|
@@ -682,7 +687,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
682
687
|
const { getShowBackToTop } = useHeader();
|
|
683
688
|
return (_ctx, _cache) => {
|
|
684
689
|
const _component_ABackTop = BackTop;
|
|
685
|
-
return unref
|
|
690
|
+
return unref(getShowBackToTop) ? (openBlock(), createBlock(_component_ABackTop, {
|
|
686
691
|
key: 0,
|
|
687
692
|
target: getTarget,
|
|
688
693
|
visibilityHeight: 300
|
|
@@ -723,7 +728,7 @@ function useTabs(_router) {
|
|
|
723
728
|
const router = _router || useRouter();
|
|
724
729
|
const { currentRoute } = router;
|
|
725
730
|
const getCurrentTab = () => {
|
|
726
|
-
const route = unref
|
|
731
|
+
const route = unref(currentRoute);
|
|
727
732
|
return tabStore.getTabList.find((item) => item.fullPath === route.fullPath);
|
|
728
733
|
};
|
|
729
734
|
function handleTabAction(action, tab) {
|
|
@@ -765,7 +770,7 @@ function useTabDropdown(tabItem, getIsTabs) {
|
|
|
765
770
|
const tabStore = useRouteReuseStore();
|
|
766
771
|
const { refreshPage, closeAll, close, closeLeft, closeOther, closeRight } = useTabs();
|
|
767
772
|
const getTargetTab = computed(() => {
|
|
768
|
-
return unref
|
|
773
|
+
return unref(getIsTabs) ? tabItem : unref(currentRoute);
|
|
769
774
|
});
|
|
770
775
|
const state = reactive({
|
|
771
776
|
current: null,
|
|
@@ -773,8 +778,8 @@ function useTabDropdown(tabItem, getIsTabs) {
|
|
|
773
778
|
});
|
|
774
779
|
const getDropMenuList = computed(() => {
|
|
775
780
|
const { t } = useI18n("UI");
|
|
776
|
-
const { meta } = unref
|
|
777
|
-
const { path } = unref
|
|
781
|
+
const { meta } = unref(getTargetTab);
|
|
782
|
+
const { path } = unref(currentRoute);
|
|
778
783
|
const curItem = state.current;
|
|
779
784
|
const isCurItem = curItem ? curItem.path === path : false;
|
|
780
785
|
const index = state.currentIndex;
|
|
@@ -864,7 +869,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
864
869
|
const menuLabelMap = menuList2Map();
|
|
865
870
|
const getIsTabs = computed(() => !props.isExtra);
|
|
866
871
|
const getTrigger = computed(
|
|
867
|
-
() => unref
|
|
872
|
+
() => unref(getIsTabs) ? ["contextmenu"] : ["click"]
|
|
868
873
|
);
|
|
869
874
|
const { getDropMenuList, handleContextMenu, handleMenuEvent } = useTabDropdown(props?.tabItem, getIsTabs);
|
|
870
875
|
function handleContext(e) {
|
|
@@ -877,16 +882,16 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
877
882
|
const _component_ADropdown = Dropdown;
|
|
878
883
|
return openBlock(), createBlock(_component_ADropdown, {
|
|
879
884
|
placement: "bottomRight",
|
|
880
|
-
trigger: unref
|
|
885
|
+
trigger: unref(getTrigger),
|
|
881
886
|
overlayClassName: "dt-reuse-tabs__dropdown"
|
|
882
887
|
}, {
|
|
883
888
|
overlay: withCtx(() => [
|
|
884
889
|
createVNode(_component_AMenu, null, {
|
|
885
890
|
default: withCtx(() => [
|
|
886
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref
|
|
891
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(getDropMenuList), (item, index) => {
|
|
887
892
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
888
893
|
createVNode(_component_AMenuItem, {
|
|
889
|
-
onClick: ($event) => unref
|
|
894
|
+
onClick: ($event) => unref(handleMenuEvent)(item),
|
|
890
895
|
disabled: item.disabled
|
|
891
896
|
}, {
|
|
892
897
|
default: withCtx(() => [
|
|
@@ -907,11 +912,11 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
907
912
|
})
|
|
908
913
|
]),
|
|
909
914
|
default: withCtx(() => [
|
|
910
|
-
unref
|
|
915
|
+
unref(getIsTabs) ? (openBlock(), createElementBlock("div", {
|
|
911
916
|
key: 0,
|
|
912
917
|
onContextmenu: handleContext
|
|
913
918
|
}, [
|
|
914
|
-
createElementVNode("span", null, toDisplayString(unref
|
|
919
|
+
createElementVNode("span", null, toDisplayString(unref(menuLabelMap).get(__props.tabItem.path) || __props.tabItem?.meta?.title || unref(t)("UNKNOWN_ROUTE")), 1)
|
|
915
920
|
], 32)) : (openBlock(), createElementBlock("span", {
|
|
916
921
|
key: 1,
|
|
917
922
|
onClick: handleContext,
|
|
@@ -959,7 +964,7 @@ function useSortable(el, options) {
|
|
|
959
964
|
if (!el)
|
|
960
965
|
return;
|
|
961
966
|
const Sortable = (await import("sortablejs")).default;
|
|
962
|
-
Sortable.create(unref
|
|
967
|
+
Sortable.create(unref(el), {
|
|
963
968
|
animation: 500,
|
|
964
969
|
delay: 400,
|
|
965
970
|
delayOnTouchOnly: true,
|
|
@@ -973,7 +978,7 @@ function useTabsDrag(affixList) {
|
|
|
973
978
|
const tabStore = useRouteReuseStore();
|
|
974
979
|
const { getCanDrag } = useMultipleTab();
|
|
975
980
|
nextTick(() => {
|
|
976
|
-
if (!unref
|
|
981
|
+
if (!unref(getCanDrag))
|
|
977
982
|
return;
|
|
978
983
|
const el = document.querySelectorAll(`.dt-reuse-tabs .ant-tabs-nav-list`)?.[0];
|
|
979
984
|
const { initSortable } = useSortable(el, {
|
|
@@ -1005,13 +1010,13 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
1005
1010
|
const getTabsState = computed(() => {
|
|
1006
1011
|
return tabStore.getTabList.filter((item) => !item.meta?.hideTab);
|
|
1007
1012
|
});
|
|
1008
|
-
const unClose = computed(() => unref
|
|
1013
|
+
const unClose = computed(() => unref(getTabsState).length === 1);
|
|
1009
1014
|
function handleChange(activeKey) {
|
|
1010
1015
|
activeKeyRef.value = activeKey;
|
|
1011
1016
|
go(activeKey);
|
|
1012
1017
|
}
|
|
1013
1018
|
function handleEdit(targetKey) {
|
|
1014
|
-
if (unref
|
|
1019
|
+
if (unref(unClose))
|
|
1015
1020
|
return;
|
|
1016
1021
|
tabStore.closeTabByKey(targetKey, router);
|
|
1017
1022
|
}
|
|
@@ -1022,13 +1027,13 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
1022
1027
|
(v) => {
|
|
1023
1028
|
if (v === "/" || v === "/login")
|
|
1024
1029
|
return;
|
|
1025
|
-
const { meta = {} } = unref
|
|
1030
|
+
const { meta = {} } = unref(router.currentRoute);
|
|
1026
1031
|
const { hideTab = false } = meta;
|
|
1027
1032
|
if (activeKeyRef.value !== v) {
|
|
1028
1033
|
activeKeyRef.value = v;
|
|
1029
1034
|
}
|
|
1030
1035
|
if (!hideTab) {
|
|
1031
|
-
tabStore.addTab(unref
|
|
1036
|
+
tabStore.addTab(unref(router.currentRoute));
|
|
1032
1037
|
}
|
|
1033
1038
|
},
|
|
1034
1039
|
{
|
|
@@ -1051,13 +1056,13 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
1051
1056
|
class: "h-8"
|
|
1052
1057
|
}, createSlots({
|
|
1053
1058
|
default: withCtx(() => [
|
|
1054
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref
|
|
1059
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(getTabsState), (item) => {
|
|
1055
1060
|
return openBlock(), createBlock(_component_ATabPane, {
|
|
1056
1061
|
key: item.query ? item.fullPath : item.path,
|
|
1057
1062
|
closable: !(item && item.meta && item.meta.affix)
|
|
1058
1063
|
}, {
|
|
1059
1064
|
tab: withCtx(() => [
|
|
1060
|
-
unref
|
|
1065
|
+
unref(getShowQuick) ? (openBlock(), createBlock(unref(_sfc_main$y), {
|
|
1061
1066
|
key: 0,
|
|
1062
1067
|
tabItem: item
|
|
1063
1068
|
}, null, 8, ["tabItem"])) : createCommentVNode("", true)
|
|
@@ -1068,11 +1073,11 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
1068
1073
|
]),
|
|
1069
1074
|
_: 2
|
|
1070
1075
|
}, [
|
|
1071
|
-
unref
|
|
1076
|
+
unref(getShowRedo) || unref(getShowQuick) ? {
|
|
1072
1077
|
name: "rightExtra",
|
|
1073
1078
|
fn: withCtx(() => [
|
|
1074
|
-
unref
|
|
1075
|
-
unref
|
|
1079
|
+
unref(getShowRedo) ? (openBlock(), createBlock(unref(_sfc_main$z), { key: 0 })) : createCommentVNode("", true),
|
|
1080
|
+
unref(getShowQuick) ? (openBlock(), createBlock(unref(_sfc_main$y), {
|
|
1076
1081
|
key: 1,
|
|
1077
1082
|
isExtra: "",
|
|
1078
1083
|
tabItem: _ctx.$route
|
|
@@ -1092,10 +1097,10 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
1092
1097
|
return (_ctx, _cache) => {
|
|
1093
1098
|
return openBlock(), createElementBlock("span", {
|
|
1094
1099
|
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
|
|
1100
|
+
onClick: _cache[0] || (_cache[0] = (...args) => unref(toggle) && unref(toggle)(...args))
|
|
1096
1101
|
}, [
|
|
1097
1102
|
createElementVNode("i", {
|
|
1098
|
-
class: normalizeClass(["i block", !unref
|
|
1103
|
+
class: normalizeClass(["i block", !unref(isFullscreen) ? "ic:baseline-fullscreen" : "ic:baseline-fullscreen-exit"])
|
|
1099
1104
|
}, null, 2)
|
|
1100
1105
|
]);
|
|
1101
1106
|
};
|
|
@@ -1282,29 +1287,29 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
1282
1287
|
return rsStyle;
|
|
1283
1288
|
});
|
|
1284
1289
|
const handleScroll = () => {
|
|
1285
|
-
moveY.value = unref
|
|
1286
|
-
moveX.value = unref
|
|
1290
|
+
moveY.value = unref(wrap).scrollTop * 100 / unref(wrap).clientHeight;
|
|
1291
|
+
moveX.value = unref(wrap).scrollLeft * 100 / unref(wrap).clientWidth;
|
|
1287
1292
|
};
|
|
1288
1293
|
const update = () => {
|
|
1289
|
-
if (!unref
|
|
1294
|
+
if (!unref(wrap))
|
|
1290
1295
|
return;
|
|
1291
|
-
const heightPercentage = unref
|
|
1292
|
-
const widthPercentage = unref
|
|
1296
|
+
const heightPercentage = unref(wrap).clientHeight * 100 / unref(wrap).scrollHeight;
|
|
1297
|
+
const widthPercentage = unref(wrap).clientWidth * 100 / unref(wrap).scrollWidth;
|
|
1293
1298
|
sizeHeight.value = heightPercentage < 100 ? heightPercentage + "%" : "";
|
|
1294
1299
|
sizeWidth.value = widthPercentage < 100 ? widthPercentage + "%" : "";
|
|
1295
1300
|
};
|
|
1296
1301
|
onMounted(() => {
|
|
1297
1302
|
nextTick(update);
|
|
1298
1303
|
if (!props.noresize) {
|
|
1299
|
-
addResizeListener(unref
|
|
1300
|
-
addResizeListener(unref
|
|
1304
|
+
addResizeListener(unref(resize), update);
|
|
1305
|
+
addResizeListener(unref(wrap), update);
|
|
1301
1306
|
addEventListener("resize", update);
|
|
1302
1307
|
}
|
|
1303
1308
|
});
|
|
1304
1309
|
onBeforeUnmount(() => {
|
|
1305
1310
|
if (!props.noresize) {
|
|
1306
|
-
removeResizeListener(unref
|
|
1307
|
-
removeResizeListener(unref
|
|
1311
|
+
removeResizeListener(unref(resize), update);
|
|
1312
|
+
removeResizeListener(unref(wrap), update);
|
|
1308
1313
|
removeEventListener("resize", update);
|
|
1309
1314
|
}
|
|
1310
1315
|
});
|
|
@@ -1314,7 +1319,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
1314
1319
|
ref_key: "wrap",
|
|
1315
1320
|
ref: wrap,
|
|
1316
1321
|
class: normalizeClass([[__props.wrapClass, "scrollbar__wrap--hidden-default"], "h-full overflow-auto"]),
|
|
1317
|
-
style: normalizeStyle(unref
|
|
1322
|
+
style: normalizeStyle(unref(style)),
|
|
1318
1323
|
onScroll: handleScroll
|
|
1319
1324
|
}, [
|
|
1320
1325
|
(openBlock(), createBlock(resolveDynamicComponent(__props.tag), {
|
|
@@ -1329,11 +1334,11 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
1329
1334
|
_: 3
|
|
1330
1335
|
}, 8, ["class", "style"]))
|
|
1331
1336
|
], 38),
|
|
1332
|
-
createVNode(unref
|
|
1337
|
+
createVNode(unref(Bar), {
|
|
1333
1338
|
move: moveX.value,
|
|
1334
1339
|
size: sizeWidth.value
|
|
1335
1340
|
}, null, 8, ["move", "size"]),
|
|
1336
|
-
createVNode(unref
|
|
1341
|
+
createVNode(unref(Bar), {
|
|
1337
1342
|
vertical: "",
|
|
1338
1343
|
move: moveY.value,
|
|
1339
1344
|
size: sizeHeight.value
|
|
@@ -1373,7 +1378,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
1373
1378
|
const props = __props;
|
|
1374
1379
|
const Container = h("div", [props.template(props.data)]);
|
|
1375
1380
|
return (_ctx, _cache) => {
|
|
1376
|
-
return openBlock(), createBlock(unref
|
|
1381
|
+
return openBlock(), createBlock(unref(Container));
|
|
1377
1382
|
};
|
|
1378
1383
|
}
|
|
1379
1384
|
});
|
|
@@ -1407,17 +1412,17 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
1407
1412
|
});
|
|
1408
1413
|
return (_ctx, _cache) => {
|
|
1409
1414
|
return openBlock(), createElementBlock("div", {
|
|
1410
|
-
class: normalizeClass(unref
|
|
1415
|
+
class: normalizeClass(unref(getLogoClass)),
|
|
1411
1416
|
style: normalizeStyle({
|
|
1412
|
-
minWidth: `${unref
|
|
1417
|
+
minWidth: `${unref(getLogoWidth)}px`
|
|
1413
1418
|
})
|
|
1414
1419
|
}, [
|
|
1415
|
-
unref
|
|
1420
|
+
unref(slots)?.logo ? (openBlock(), createBlock(unref(DtSlotContainer), {
|
|
1416
1421
|
key: 0,
|
|
1417
|
-
template: unref
|
|
1422
|
+
template: unref(slots).logo
|
|
1418
1423
|
}, 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
|
|
1424
|
+
createElementVNode("img", { src: unref(logoUrl) }, null, 8, _hoisted_1$g),
|
|
1425
|
+
withDirectives(createElementVNode("div", { class: "dt-logo__title text-base font-bold transition-all duration-500 pl-3" }, toDisplayString(unref(title)), 513), [
|
|
1421
1426
|
[vShow, __props.showTitle]
|
|
1422
1427
|
])
|
|
1423
1428
|
], 64))
|
|
@@ -1434,10 +1439,10 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
1434
1439
|
return (_ctx, _cache) => {
|
|
1435
1440
|
return openBlock(), createElementBlock("div", {
|
|
1436
1441
|
class: normalizeClass(["flex w-12 h-full cursor-pointer items-center justify-center", props.theme]),
|
|
1437
|
-
onClick: _cache[0] || (_cache[0] = (...args) => unref
|
|
1442
|
+
onClick: _cache[0] || (_cache[0] = (...args) => unref(toggleCollapsed) && unref(toggleCollapsed)(...args))
|
|
1438
1443
|
}, [
|
|
1439
1444
|
createElementVNode("i", {
|
|
1440
|
-
class: normalizeClass(["i leading-none", unref
|
|
1445
|
+
class: normalizeClass(["i leading-none", unref(getCollapsed) ? "ic:baseline-format-indent-increase" : "ic:baseline-format-indent-decrease"])
|
|
1441
1446
|
}, null, 2)
|
|
1442
1447
|
], 2);
|
|
1443
1448
|
};
|
|
@@ -1460,9 +1465,9 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
1460
1465
|
return (_ctx, _cache) => {
|
|
1461
1466
|
const _component_ABreadcrumb = Breadcrumb;
|
|
1462
1467
|
return openBlock(), createElementBlock("div", _hoisted_1$f, [
|
|
1463
|
-
createVNode(_component_ABreadcrumb, { routes: unref
|
|
1468
|
+
createVNode(_component_ABreadcrumb, { routes: unref(routes) }, {
|
|
1464
1469
|
itemRender: withCtx(({ route }) => [
|
|
1465
|
-
createElementVNode("span", null, toDisplayString((unref
|
|
1470
|
+
createElementVNode("span", null, toDisplayString((unref(getIsZH) ? route.label : route.enLabel) || route.meta?.title), 1)
|
|
1466
1471
|
]),
|
|
1467
1472
|
_: 1
|
|
1468
1473
|
}, 8, ["routes"])
|
|
@@ -1511,7 +1516,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
1511
1516
|
const _component_AEmpty = Empty;
|
|
1512
1517
|
const _component_AInputSearch = InputSearch;
|
|
1513
1518
|
const _component_APopover = Popover;
|
|
1514
|
-
return unref
|
|
1519
|
+
return unref(isUseDef) ? (openBlock(), createElementBlock("div", _hoisted_1$e, [
|
|
1515
1520
|
createVNode(_component_APopover, {
|
|
1516
1521
|
placement: "bottom",
|
|
1517
1522
|
overlayClassName: "dt-menu-filter__popover",
|
|
@@ -1523,7 +1528,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
1523
1528
|
return openBlock(), createElementBlock("p", {
|
|
1524
1529
|
onClick: ($event) => navigation(menu.url),
|
|
1525
1530
|
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
|
|
1531
|
+
}, toDisplayString(unref(getIsZH) ? menu.label : menu.enLabel), 9, _hoisted_2$9);
|
|
1527
1532
|
}), 256)),
|
|
1528
1533
|
!menuList.value.length ? (openBlock(), createElementBlock("div", _hoisted_3$7, [
|
|
1529
1534
|
createVNode(_component_AEmpty, {
|
|
@@ -1536,9 +1541,9 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
1536
1541
|
createVNode(_component_AInputSearch, {
|
|
1537
1542
|
value: filter.value,
|
|
1538
1543
|
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => filter.value = $event),
|
|
1539
|
-
placeholder: unref
|
|
1544
|
+
placeholder: unref(t)("FILTER_MORE"),
|
|
1540
1545
|
onInput: filterMenu,
|
|
1541
|
-
size: unref
|
|
1546
|
+
size: unref(UiSize).SMALL
|
|
1542
1547
|
}, null, 8, ["value", "placeholder", "size"])
|
|
1543
1548
|
]),
|
|
1544
1549
|
_: 1
|
|
@@ -1585,10 +1590,10 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
1585
1590
|
}, {
|
|
1586
1591
|
content: withCtx(() => [
|
|
1587
1592
|
createElementVNode("ul", _hoisted_1$d, [
|
|
1588
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref
|
|
1593
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(localeList), (it) => {
|
|
1589
1594
|
return openBlock(), createElementBlock("li", {
|
|
1590
1595
|
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
|
|
1596
|
+
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
1597
|
}, [
|
|
1593
1598
|
withDirectives(createElementVNode("span", _hoisted_3$6, null, 512), [
|
|
1594
1599
|
[_directive_icon, it.icon]
|
|
@@ -1622,9 +1627,9 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1622
1627
|
overlayClassName: "dt-notify__popover"
|
|
1623
1628
|
}, {
|
|
1624
1629
|
content: withCtx(() => [
|
|
1625
|
-
unref
|
|
1630
|
+
unref(slots)?.notify ? (openBlock(), createBlock(unref(DtSlotContainer$1), {
|
|
1626
1631
|
key: 0,
|
|
1627
|
-
template: unref
|
|
1632
|
+
template: unref(slots).notify
|
|
1628
1633
|
}, null, 8, ["template"])) : createCommentVNode("", true)
|
|
1629
1634
|
]),
|
|
1630
1635
|
default: withCtx(() => [
|
|
@@ -1632,9 +1637,9 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1632
1637
|
withDirectives(createElementVNode("span", null, null, 512), [
|
|
1633
1638
|
[_directive_icon, "ant-design:bell-outlined"]
|
|
1634
1639
|
]),
|
|
1635
|
-
unref
|
|
1640
|
+
unref(slots)?.notifyBadge ? (openBlock(), createBlock(unref(DtSlotContainer$1), {
|
|
1636
1641
|
key: 0,
|
|
1637
|
-
template: unref
|
|
1642
|
+
template: unref(slots).notifyBadge
|
|
1638
1643
|
}, null, 8, ["template"])) : createCommentVNode("", true)
|
|
1639
1644
|
])
|
|
1640
1645
|
]),
|
|
@@ -1678,7 +1683,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
1678
1683
|
});
|
|
1679
1684
|
}
|
|
1680
1685
|
return (_ctx, _cache) => {
|
|
1681
|
-
return openBlock(), createBlock(unref
|
|
1686
|
+
return openBlock(), createBlock(unref(Popover$1), {
|
|
1682
1687
|
placement: "bottom",
|
|
1683
1688
|
visible: visible.value,
|
|
1684
1689
|
"onUpdate:visible": _cache[0] || (_cache[0] = ($event) => visible.value = $event),
|
|
@@ -1690,7 +1695,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
1690
1695
|
(openBlock(), createElementBlock(Fragment, null, renderList(sizeList, (it) => {
|
|
1691
1696
|
return createElementVNode("li", {
|
|
1692
1697
|
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
|
|
1698
|
+
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
1699
|
}, [
|
|
1695
1700
|
createElementVNode("span", null, toDisplayString(it.text), 1)
|
|
1696
1701
|
], 10, _hoisted_2$7);
|
|
@@ -1768,7 +1773,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
1768
1773
|
visible.value = true;
|
|
1769
1774
|
}
|
|
1770
1775
|
function onLock() {
|
|
1771
|
-
useLockscreen.setLock(true, unref
|
|
1776
|
+
useLockscreen.setLock(true, unref(password));
|
|
1772
1777
|
visible.value = false;
|
|
1773
1778
|
popoverVisible.value = false;
|
|
1774
1779
|
}
|
|
@@ -1789,11 +1794,11 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
1789
1794
|
}, {
|
|
1790
1795
|
content: withCtx(() => [
|
|
1791
1796
|
createElementVNode("div", _hoisted_1$a, [
|
|
1792
|
-
unref
|
|
1797
|
+
unref(slots).userInfo ? (openBlock(), createBlock(unref(DtSlotContainer$1), {
|
|
1793
1798
|
key: 0,
|
|
1794
|
-
template: unref
|
|
1799
|
+
template: unref(slots).userInfo
|
|
1795
1800
|
}, null, 8, ["template"])) : createCommentVNode("", true),
|
|
1796
|
-
unref
|
|
1801
|
+
unref(getLockscreen) ? (openBlock(), createElementBlock("div", {
|
|
1797
1802
|
key: 1,
|
|
1798
1803
|
onClick: _cache[0] || (_cache[0] = ($event) => lockScreen()),
|
|
1799
1804
|
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 +1808,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
1803
1808
|
]),
|
|
1804
1809
|
_hoisted_3$4
|
|
1805
1810
|
])) : createCommentVNode("", true),
|
|
1806
|
-
unref
|
|
1811
|
+
unref(getShowLoginOut) ? (openBlock(), createElementBlock("div", {
|
|
1807
1812
|
key: 2,
|
|
1808
1813
|
onClick: _cache[1] || (_cache[1] = ($event) => signOut()),
|
|
1809
1814
|
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 +1816,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
1811
1816
|
withDirectives(createElementVNode("span", _hoisted_4$4, null, 512), [
|
|
1812
1817
|
[_directive_icon, "ant-design:logout-outlined"]
|
|
1813
1818
|
]),
|
|
1814
|
-
createElementVNode("span", null, toDisplayString(unref
|
|
1819
|
+
createElementVNode("span", null, toDisplayString(unref(t)("LOGIN_OUT")), 1)
|
|
1815
1820
|
])) : createCommentVNode("", true)
|
|
1816
1821
|
])
|
|
1817
1822
|
]),
|
|
@@ -1819,14 +1824,14 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
1819
1824
|
createElementVNode("div", _hoisted_5$3, [
|
|
1820
1825
|
createVNode(_component_AAvatar, { size: 28 }, createSlots({
|
|
1821
1826
|
default: withCtx(() => [
|
|
1822
|
-
unref
|
|
1827
|
+
unref(slots)?.icon ? (openBlock(), createBlock(unref(DtSlotContainer$1), {
|
|
1823
1828
|
key: 0,
|
|
1824
|
-
template: unref
|
|
1829
|
+
template: unref(slots).icon
|
|
1825
1830
|
}, null, 8, ["template"])) : createCommentVNode("", true)
|
|
1826
1831
|
]),
|
|
1827
1832
|
_: 2
|
|
1828
1833
|
}, [
|
|
1829
|
-
!unref
|
|
1834
|
+
!unref(slots)?.icon ? {
|
|
1830
1835
|
name: "icon",
|
|
1831
1836
|
fn: withCtx(() => [
|
|
1832
1837
|
_hoisted_6$3
|
|
@@ -1834,7 +1839,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
1834
1839
|
key: "0"
|
|
1835
1840
|
} : void 0
|
|
1836
1841
|
]), 1024),
|
|
1837
|
-
createElementVNode("span", _hoisted_7$2, toDisplayString(unref
|
|
1842
|
+
createElementVNode("span", _hoisted_7$2, toDisplayString(unref(getUserInfo)?.userNo), 1)
|
|
1838
1843
|
])
|
|
1839
1844
|
]),
|
|
1840
1845
|
_: 1
|
|
@@ -1848,11 +1853,11 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
1848
1853
|
}, {
|
|
1849
1854
|
default: withCtx(() => [
|
|
1850
1855
|
createElementVNode("div", _hoisted_8$2, [
|
|
1851
|
-
unref
|
|
1856
|
+
unref(slots)?.icon ? (openBlock(), createBlock(unref(DtSlotContainer$1), {
|
|
1852
1857
|
key: 0,
|
|
1853
|
-
template: unref
|
|
1858
|
+
template: unref(slots).icon
|
|
1854
1859
|
}, null, 8, ["template"])) : createCommentVNode("", true),
|
|
1855
|
-
createElementVNode("span", _hoisted_9$2, toDisplayString(unref
|
|
1860
|
+
createElementVNode("span", _hoisted_9$2, toDisplayString(unref(getUserInfo)?.userNo), 1),
|
|
1856
1861
|
createVNode(_component_AInputPassword, {
|
|
1857
1862
|
class: "mt-2",
|
|
1858
1863
|
autofocus: "",
|
|
@@ -2041,7 +2046,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2041
2046
|
shadow-gray-200`,
|
|
2042
2047
|
`dt-menu-type__item--${item.type}`,
|
|
2043
2048
|
{
|
|
2044
|
-
[`dt-menu-type__item--active`]: unref
|
|
2049
|
+
[`dt-menu-type__item--active`]: unref(getMenuType) === item.type && unref(getMenuMode) === item.mode
|
|
2045
2050
|
}
|
|
2046
2051
|
])
|
|
2047
2052
|
}, _hoisted_4$3, 10, _hoisted_2$5)
|
|
@@ -2079,7 +2084,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
2079
2084
|
const _component_ASelect = Select;
|
|
2080
2085
|
return openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
2081
2086
|
createElementVNode("span", null, toDisplayString(__props.title), 1),
|
|
2082
|
-
createVNode(_component_ASelect, mergeProps(unref
|
|
2087
|
+
createVNode(_component_ASelect, mergeProps(unref(getBindValue), {
|
|
2083
2088
|
disabled: __props.disabled,
|
|
2084
2089
|
size: "small",
|
|
2085
2090
|
class: "w-32",
|
|
@@ -2116,10 +2121,10 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2116
2121
|
const _component_ASwitch = Switch;
|
|
2117
2122
|
return openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
2118
2123
|
createElementVNode("span", null, toDisplayString(__props.title), 1),
|
|
2119
|
-
createVNode(_component_ASwitch, mergeProps(unref
|
|
2124
|
+
createVNode(_component_ASwitch, mergeProps(unref(getBindValue), {
|
|
2120
2125
|
disabled: __props.disabled,
|
|
2121
|
-
checkedChildren: unref
|
|
2122
|
-
unCheckedChildren: unref
|
|
2126
|
+
checkedChildren: unref(t)("ON"),
|
|
2127
|
+
unCheckedChildren: unref(t)("OFF"),
|
|
2123
2128
|
onChange: handleChange
|
|
2124
2129
|
}), null, 16, ["disabled", "checkedChildren", "unCheckedChildren"])
|
|
2125
2130
|
]);
|
|
@@ -2206,7 +2211,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
2206
2211
|
key: item.title,
|
|
2207
2212
|
title: item.title,
|
|
2208
2213
|
event: item.event,
|
|
2209
|
-
def: unref
|
|
2214
|
+
def: unref(item.def)
|
|
2210
2215
|
}, null, 8, ["title", "event", "def"]);
|
|
2211
2216
|
}), 64)),
|
|
2212
2217
|
(openBlock(), createElementBlock(Fragment, null, renderList(selectItems, (item) => {
|
|
@@ -2214,7 +2219,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
2214
2219
|
key: item.title,
|
|
2215
2220
|
title: item.title,
|
|
2216
2221
|
event: item.event,
|
|
2217
|
-
def: unref
|
|
2222
|
+
def: unref(item.def),
|
|
2218
2223
|
options: item.options
|
|
2219
2224
|
}, null, 8, ["title", "event", "def", "options"]);
|
|
2220
2225
|
}), 64))
|
|
@@ -2243,24 +2248,24 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2243
2248
|
const defaultConf = getConfig();
|
|
2244
2249
|
function getConfig() {
|
|
2245
2250
|
return {
|
|
2246
|
-
contentMode: unref
|
|
2251
|
+
contentMode: unref(getContentMode),
|
|
2247
2252
|
menuOptions: {
|
|
2248
|
-
mode: unref
|
|
2249
|
-
type: unref
|
|
2250
|
-
split: unref
|
|
2253
|
+
mode: unref(getMenuMode),
|
|
2254
|
+
type: unref(getMenuType),
|
|
2255
|
+
split: unref(getMenuType) === MenuType.MIX ? true : false
|
|
2251
2256
|
},
|
|
2252
2257
|
headOptions: {
|
|
2253
|
-
showBreadCrumb: unref
|
|
2254
|
-
showSearch: unref
|
|
2255
|
-
notice: unref
|
|
2256
|
-
showFullScreen: unref
|
|
2257
|
-
showLocaleSwitch: unref
|
|
2258
|
+
showBreadCrumb: unref(getShowBread),
|
|
2259
|
+
showSearch: unref(getShowSearch),
|
|
2260
|
+
notice: unref(getShowNotice),
|
|
2261
|
+
showFullScreen: unref(getShowFullScreen),
|
|
2262
|
+
showLocaleSwitch: unref(getShowLocale)
|
|
2258
2263
|
},
|
|
2259
2264
|
mulTabsOptions: {
|
|
2260
|
-
show: unref
|
|
2265
|
+
show: unref(getShowMultipleTab)
|
|
2261
2266
|
},
|
|
2262
2267
|
footerOptions: {
|
|
2263
|
-
show: unref
|
|
2268
|
+
show: unref(getShowFooter)
|
|
2264
2269
|
}
|
|
2265
2270
|
};
|
|
2266
2271
|
}
|
|
@@ -2321,25 +2326,25 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2321
2326
|
createVNode(_component_ADrawer, {
|
|
2322
2327
|
visible: visible.value,
|
|
2323
2328
|
"onUpdate:visible": _cache[1] || (_cache[1] = ($event) => visible.value = $event),
|
|
2324
|
-
title: unref
|
|
2329
|
+
title: unref(t)("PROJECT_SETTING"),
|
|
2325
2330
|
placement: "right",
|
|
2326
2331
|
width: "320"
|
|
2327
2332
|
}, {
|
|
2328
2333
|
default: withCtx(() => [
|
|
2329
2334
|
createVNode(_component_ADivider, null, {
|
|
2330
2335
|
default: withCtx(() => [
|
|
2331
|
-
createTextVNode(toDisplayString(unref
|
|
2336
|
+
createTextVNode(toDisplayString(unref(t)("NAV_MODE")), 1)
|
|
2332
2337
|
]),
|
|
2333
2338
|
_: 1
|
|
2334
2339
|
}),
|
|
2335
|
-
createVNode(unref
|
|
2340
|
+
createVNode(unref(_sfc_main$k)),
|
|
2336
2341
|
createVNode(_component_ADivider, null, {
|
|
2337
2342
|
default: withCtx(() => [
|
|
2338
|
-
createTextVNode(toDisplayString(unref
|
|
2343
|
+
createTextVNode(toDisplayString(unref(t)("PAGE_SHOW")), 1)
|
|
2339
2344
|
]),
|
|
2340
2345
|
_: 1
|
|
2341
2346
|
}),
|
|
2342
|
-
createVNode(unref
|
|
2347
|
+
createVNode(unref(_sfc_main$h)),
|
|
2343
2348
|
createVNode(_component_ADivider),
|
|
2344
2349
|
createElementVNode("div", _hoisted_1$6, [
|
|
2345
2350
|
createVNode(_component_AButton, {
|
|
@@ -2349,7 +2354,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2349
2354
|
block: ""
|
|
2350
2355
|
}, {
|
|
2351
2356
|
default: withCtx(() => [
|
|
2352
|
-
createTextVNode(toDisplayString(unref
|
|
2357
|
+
createTextVNode(toDisplayString(unref(t)("COPY")), 1)
|
|
2353
2358
|
]),
|
|
2354
2359
|
_: 1
|
|
2355
2360
|
}),
|
|
@@ -2359,12 +2364,12 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2359
2364
|
block: ""
|
|
2360
2365
|
}, {
|
|
2361
2366
|
default: withCtx(() => [
|
|
2362
|
-
createTextVNode(toDisplayString(unref
|
|
2367
|
+
createTextVNode(toDisplayString(unref(t)("RESET")), 1)
|
|
2363
2368
|
]),
|
|
2364
2369
|
_: 1
|
|
2365
2370
|
})
|
|
2366
2371
|
]),
|
|
2367
|
-
createElementVNode("div", _hoisted_2$4, toDisplayString(unref
|
|
2372
|
+
createElementVNode("div", _hoisted_2$4, toDisplayString(unref(t)("DRAWER_TIPS")), 1)
|
|
2368
2373
|
]),
|
|
2369
2374
|
_: 1
|
|
2370
2375
|
}, 8, ["visible", "title"])
|
|
@@ -2379,21 +2384,21 @@ function useSplitMenu(splitType) {
|
|
|
2379
2384
|
const { getIsHorizontal, getSplit } = useMenu();
|
|
2380
2385
|
const throttleHandleSplitLeftMenu = useThrottleFn(handleSplitLeftMenu, 50);
|
|
2381
2386
|
const splitNotLeft = computed(
|
|
2382
|
-
() => unref
|
|
2387
|
+
() => unref(splitType) !== MenuSplitTye.LEFT && !unref(getIsHorizontal)
|
|
2383
2388
|
);
|
|
2384
2389
|
const getSplitLeft = computed(
|
|
2385
|
-
() => !unref
|
|
2390
|
+
() => !unref(getSplit) || unref(splitType) !== MenuSplitTye.LEFT
|
|
2386
2391
|
);
|
|
2387
2392
|
const getSplitTop = computed(
|
|
2388
|
-
() => unref
|
|
2393
|
+
() => unref(splitType) === MenuSplitTye.TOP
|
|
2389
2394
|
);
|
|
2390
2395
|
const normalType = computed(
|
|
2391
|
-
() => !unref
|
|
2396
|
+
() => !unref(getSplit) || unref(splitType) === MenuSplitTye.NONE
|
|
2392
2397
|
);
|
|
2393
2398
|
watch(
|
|
2394
|
-
[() => unref
|
|
2399
|
+
[() => unref(currentRoute)?.path, () => unref(splitType)],
|
|
2395
2400
|
([path]) => {
|
|
2396
|
-
if (unref
|
|
2401
|
+
if (unref(splitNotLeft))
|
|
2397
2402
|
return;
|
|
2398
2403
|
throttleHandleSplitLeftMenu(path);
|
|
2399
2404
|
},
|
|
@@ -2404,22 +2409,22 @@ function useSplitMenu(splitType) {
|
|
|
2404
2409
|
watch(
|
|
2405
2410
|
() => getSplit.value,
|
|
2406
2411
|
() => {
|
|
2407
|
-
if (unref
|
|
2412
|
+
if (unref(splitNotLeft))
|
|
2408
2413
|
return;
|
|
2409
2414
|
getMenus2();
|
|
2410
2415
|
}
|
|
2411
2416
|
);
|
|
2412
2417
|
function handleSplitLeftMenu(path) {
|
|
2413
|
-
if (unref
|
|
2418
|
+
if (unref(getSplitLeft))
|
|
2414
2419
|
return;
|
|
2415
2420
|
menusRef.value = menusMap.filter((it) => it.includesPath.includes(path))[0]?.children;
|
|
2416
2421
|
}
|
|
2417
2422
|
async function getMenus2() {
|
|
2418
|
-
if (unref
|
|
2423
|
+
if (unref(normalType)) {
|
|
2419
2424
|
menusRef.value = DtCache.getLocal(CacheKey.MENUS)?.children;
|
|
2420
2425
|
return;
|
|
2421
2426
|
}
|
|
2422
|
-
if (unref
|
|
2427
|
+
if (unref(getSplitTop)) {
|
|
2423
2428
|
menusRef.value = await getShallowMenus();
|
|
2424
2429
|
}
|
|
2425
2430
|
}
|
|
@@ -2546,12 +2551,12 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
2546
2551
|
const { getIsZH, getUiSize } = useHeader();
|
|
2547
2552
|
return (_ctx, _cache) => {
|
|
2548
2553
|
return openBlock(), createElementBlock("span", {
|
|
2549
|
-
class: normalizeClass(["dt-basic-menu-item-content-flex items-center dt-menu-item h-full", unref
|
|
2554
|
+
class: normalizeClass(["dt-basic-menu-item-content-flex items-center dt-menu-item h-full", unref(getUiSize)])
|
|
2550
2555
|
}, [
|
|
2551
2556
|
createElementVNode("i", {
|
|
2552
2557
|
class: normalizeClass(["menu-icon i", _ctx.item.icon])
|
|
2553
2558
|
}, null, 2),
|
|
2554
|
-
createElementVNode("span", null, toDisplayString(unref
|
|
2559
|
+
createElementVNode("span", null, toDisplayString(unref(getIsZH) ? _ctx.item.label : _ctx.item.enLabel), 1)
|
|
2555
2560
|
], 2);
|
|
2556
2561
|
};
|
|
2557
2562
|
}
|
|
@@ -2591,17 +2596,17 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
2591
2596
|
const _component_BasicSubMenuItem = resolveComponent("BasicSubMenuItem", true);
|
|
2592
2597
|
const _component_ASubMenu = SubMenu;
|
|
2593
2598
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
2594
|
-
!menuHasChildren(unref
|
|
2595
|
-
menuHasChildren(unref
|
|
2596
|
-
class: normalizeClass([unref
|
|
2597
|
-
key: unref
|
|
2599
|
+
!menuHasChildren(unref(item)) && unref(getShowMenu) ? (openBlock(), createBlock(_sfc_main$e, normalizeProps(mergeProps({ key: 0 }, props)), null, 16)) : createCommentVNode("", true),
|
|
2600
|
+
menuHasChildren(unref(item)) && unref(getShowMenu) ? (openBlock(), createBlock(_component_ASubMenu, {
|
|
2601
|
+
class: normalizeClass([unref(theme)]),
|
|
2602
|
+
key: unref(item).id,
|
|
2598
2603
|
popupClassName: "app-top-menu-popup"
|
|
2599
2604
|
}, {
|
|
2600
2605
|
title: withCtx(() => [
|
|
2601
|
-
createVNode(_sfc_main$f, mergeProps(props, { item: unref
|
|
2606
|
+
createVNode(_sfc_main$f, mergeProps(props, { item: unref(item) }), null, 16, ["item"])
|
|
2602
2607
|
]),
|
|
2603
2608
|
default: withCtx(() => [
|
|
2604
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref
|
|
2609
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(item).children, (childrenItem) => {
|
|
2605
2610
|
return openBlock(), createBlock(_component_BasicSubMenuItem, mergeProps({
|
|
2606
2611
|
key: childrenItem.id
|
|
2607
2612
|
}, props, { item: childrenItem }), null, 16, ["item"]);
|
|
@@ -2646,7 +2651,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
2646
2651
|
(val) => {
|
|
2647
2652
|
if (val === "/")
|
|
2648
2653
|
return;
|
|
2649
|
-
const { meta, path } = unref
|
|
2654
|
+
const { meta, path } = unref(currentRoute);
|
|
2650
2655
|
let activePath = meta?.currentActiveMenu || path;
|
|
2651
2656
|
handleMenuChange(activePath);
|
|
2652
2657
|
},
|
|
@@ -2656,7 +2661,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
2656
2661
|
);
|
|
2657
2662
|
async function handleMenuChange(path) {
|
|
2658
2663
|
setOpenKeys(path);
|
|
2659
|
-
if (isHorizontal && unref
|
|
2664
|
+
if (isHorizontal && unref(getSplit)) {
|
|
2660
2665
|
const parentPath = getBreadCrumb(path, items);
|
|
2661
2666
|
menuState.selectedKeys = [parentPath?.[0]?.url];
|
|
2662
2667
|
} else {
|
|
@@ -2669,9 +2674,9 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
2669
2674
|
}
|
|
2670
2675
|
const { getCollapsed } = useMenu();
|
|
2671
2676
|
const getInlineCollapsed = computed(() => {
|
|
2672
|
-
const isInline = unref
|
|
2677
|
+
const isInline = unref(mode) === MenuMode.INLINE;
|
|
2673
2678
|
if (isInline) {
|
|
2674
|
-
return mixSider ? false : unref
|
|
2679
|
+
return mixSider ? false : unref(getCollapsed);
|
|
2675
2680
|
}
|
|
2676
2681
|
return false;
|
|
2677
2682
|
});
|
|
@@ -2696,9 +2701,9 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
2696
2701
|
mode: _ctx.mode,
|
|
2697
2702
|
collapsible: "",
|
|
2698
2703
|
onClick: handleMenuClick,
|
|
2699
|
-
onOpenChange: unref
|
|
2700
|
-
collapsed: unref
|
|
2701
|
-
class: normalizeClass(unref
|
|
2704
|
+
onOpenChange: unref(handleOpenChange),
|
|
2705
|
+
collapsed: unref(getInlineCollapsed),
|
|
2706
|
+
class: normalizeClass(unref(getSplit) ? "dt-split-menu" : "")
|
|
2702
2707
|
}, {
|
|
2703
2708
|
default: withCtx(() => [
|
|
2704
2709
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.items, (item) => {
|
|
@@ -2747,22 +2752,22 @@ const _sfc_main$b = defineComponent({
|
|
|
2747
2752
|
getParentSlots(null, "dt-theme").then((rsp) => {
|
|
2748
2753
|
slots.value = rsp;
|
|
2749
2754
|
});
|
|
2750
|
-
const getComputedTheme = computed(() => props.theme || unref
|
|
2751
|
-
const getComputedMenuMode = computed(() => props.menuMode || unref
|
|
2752
|
-
const getIsShowLogo = computed(() => unref
|
|
2755
|
+
const getComputedTheme = computed(() => props.theme || unref(getMenuTheme));
|
|
2756
|
+
const getComputedMenuMode = computed(() => props.menuMode || unref(getMenuMode));
|
|
2757
|
+
const getIsShowLogo = computed(() => unref(getShowLogo) && unref(getIsSidebarType));
|
|
2753
2758
|
const getUseScroll = computed(() => {
|
|
2754
|
-
return !unref
|
|
2759
|
+
return !unref(getIsHorizontal) && (unref(getIsSidebarType) || props.splitType === MenuSplitTye.LEFT || props.splitType === MenuSplitTye.NONE);
|
|
2755
2760
|
});
|
|
2756
|
-
const getLogoClass = computed(() => [`dt-menu-logo`, unref
|
|
2761
|
+
const getLogoClass = computed(() => [`dt-menu-logo`, unref(getComputedTheme)]);
|
|
2757
2762
|
const getMenuProps = computed(() => {
|
|
2758
|
-
const menus = unref
|
|
2763
|
+
const menus = unref(menusRef);
|
|
2759
2764
|
return {
|
|
2760
2765
|
menus,
|
|
2761
2766
|
beforeClickFn: beforeMenuClickFn,
|
|
2762
2767
|
items: menus,
|
|
2763
|
-
theme: unref
|
|
2764
|
-
collapse: unref
|
|
2765
|
-
collapsedShowTitle: unref
|
|
2768
|
+
theme: unref(getComputedTheme),
|
|
2769
|
+
collapse: unref(getCollapsed),
|
|
2770
|
+
collapsedShowTitle: unref(getCollapsedShowTitle),
|
|
2766
2771
|
onMenuClick: handleMenuClick
|
|
2767
2772
|
};
|
|
2768
2773
|
});
|
|
@@ -2778,30 +2783,30 @@ const _sfc_main$b = defineComponent({
|
|
|
2778
2783
|
go(path);
|
|
2779
2784
|
}
|
|
2780
2785
|
function renderHeader() {
|
|
2781
|
-
if (!unref
|
|
2786
|
+
if (!unref(getIsShowLogo))
|
|
2782
2787
|
return null;
|
|
2783
2788
|
if (slots.value?.logo) {
|
|
2784
2789
|
return createVNode(DtSlotContainer, {
|
|
2785
2790
|
"template": slots.value?.logo,
|
|
2786
2791
|
"data": {
|
|
2787
|
-
theme: unref
|
|
2788
|
-
collapsed: unref
|
|
2792
|
+
theme: unref(getComputedTheme),
|
|
2793
|
+
collapsed: unref(getCollapsed)
|
|
2789
2794
|
}
|
|
2790
2795
|
}, null);
|
|
2791
2796
|
}
|
|
2792
2797
|
return createVNode(_sfc_main$s, {
|
|
2793
|
-
"showTitle": !unref
|
|
2794
|
-
"class": unref
|
|
2795
|
-
"theme": unref
|
|
2798
|
+
"showTitle": !unref(getCollapsed),
|
|
2799
|
+
"class": unref(getLogoClass),
|
|
2800
|
+
"theme": unref(getComputedTheme)
|
|
2796
2801
|
}, null);
|
|
2797
2802
|
}
|
|
2798
2803
|
function renderFooter() {
|
|
2799
|
-
if (unref
|
|
2804
|
+
if (unref(getMenuType) === MenuType.SIDE || unref(getMenuType) === MenuType.MIX && props.splitType === 2) {
|
|
2800
2805
|
return slots.value?.menuFooter ? createVNode(DtSlotContainer, {
|
|
2801
2806
|
"template": slots.value?.menuFooter,
|
|
2802
2807
|
"data": {
|
|
2803
|
-
theme: unref
|
|
2804
|
-
collapsed: unref
|
|
2808
|
+
theme: unref(getComputedTheme),
|
|
2809
|
+
collapsed: unref(getCollapsed)
|
|
2805
2810
|
}
|
|
2806
2811
|
}, null) : null;
|
|
2807
2812
|
}
|
|
@@ -2811,19 +2816,19 @@ const _sfc_main$b = defineComponent({
|
|
|
2811
2816
|
const {
|
|
2812
2817
|
menus,
|
|
2813
2818
|
...menuProps
|
|
2814
|
-
} = unref
|
|
2819
|
+
} = unref(getMenuProps);
|
|
2815
2820
|
if (!menus || !menus.length)
|
|
2816
2821
|
return null;
|
|
2817
2822
|
return createVNode(_sfc_main$c, mergeProps(menuProps, {
|
|
2818
2823
|
"isHorizontal": props.isHorizontal,
|
|
2819
|
-
"type": unref
|
|
2820
|
-
"showLogo": unref
|
|
2821
|
-
"mode": unref
|
|
2824
|
+
"type": unref(getMenuType),
|
|
2825
|
+
"showLogo": unref(getIsShowLogo),
|
|
2826
|
+
"mode": unref(getComputedMenuMode),
|
|
2822
2827
|
"items": menus
|
|
2823
2828
|
}), null);
|
|
2824
2829
|
}
|
|
2825
2830
|
return () => {
|
|
2826
|
-
return createVNode(Fragment, null, [renderHeader(), unref
|
|
2831
|
+
return createVNode(Fragment, null, [renderHeader(), unref(getUseScroll) ? createVNode(DtScrollContainer, null, {
|
|
2827
2832
|
default: () => renderMenu()
|
|
2828
2833
|
}) : renderMenu(), renderFooter()]);
|
|
2829
2834
|
};
|
|
@@ -2860,14 +2865,14 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
2860
2865
|
} = useHeader();
|
|
2861
2866
|
const { getShowMultipleTab, getMultipleTabPosIsTop } = useMultipleTab();
|
|
2862
2867
|
const getSplitType = computed(() => {
|
|
2863
|
-
return unref
|
|
2868
|
+
return unref(getSplit) ? MenuSplitTye.TOP : MenuSplitTye.NONE;
|
|
2864
2869
|
});
|
|
2865
2870
|
const getMenuMode = computed(() => {
|
|
2866
|
-
return unref
|
|
2871
|
+
return unref(getSplit) ? MenuMode.HORIZONTAL : null;
|
|
2867
2872
|
});
|
|
2868
|
-
const getShowTab = computed(() => unref
|
|
2873
|
+
const getShowTab = computed(() => unref(getShowMultipleTab) && unref(getMultipleTabPosIsTop));
|
|
2869
2874
|
const getHeaderCls = computed(() => {
|
|
2870
|
-
let theme = unref
|
|
2875
|
+
let theme = unref(getHeaderTheme);
|
|
2871
2876
|
let cls = "dt-header flex p-0 items-center justify-between ";
|
|
2872
2877
|
if (props.fixed) {
|
|
2873
2878
|
cls += "fixed top-0 left-0 w-full z-10 ";
|
|
@@ -2878,52 +2883,52 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
2878
2883
|
return (_ctx, _cache) => {
|
|
2879
2884
|
const _component_ALayoutHeader = LayoutHeader;
|
|
2880
2885
|
return openBlock(), createBlock(_component_ALayoutHeader, {
|
|
2881
|
-
class: normalizeClass([unref
|
|
2886
|
+
class: normalizeClass([unref(getHeaderCls), "flex items-center justify-between"])
|
|
2882
2887
|
}, {
|
|
2883
2888
|
default: withCtx(() => [
|
|
2884
2889
|
createElementVNode("div", {
|
|
2885
2890
|
class: normalizeClass(["dt-header-left flex h-full items-center", {
|
|
2886
|
-
"w-0 flex-1": unref
|
|
2891
|
+
"w-0 flex-1": unref(getShowTab)
|
|
2887
2892
|
}])
|
|
2888
2893
|
}, [
|
|
2889
|
-
unref
|
|
2894
|
+
unref(getShowHeaderLogo) ? (openBlock(), createBlock(unref(_sfc_main$s), {
|
|
2890
2895
|
key: 0,
|
|
2891
|
-
theme: unref
|
|
2896
|
+
theme: unref(getHeaderTheme),
|
|
2892
2897
|
class: "dt-header-logo"
|
|
2893
2898
|
}, null, 8, ["theme"])) : createCommentVNode("", true),
|
|
2894
|
-
unref
|
|
2899
|
+
unref(getShowHeaderTrigger) && !unref(getSplit) && !unref(getShowTab) ? (openBlock(), createBlock(unref(_sfc_main$r), {
|
|
2895
2900
|
key: 1,
|
|
2896
|
-
theme: unref
|
|
2901
|
+
theme: unref(getHeaderTheme)
|
|
2897
2902
|
}, null, 8, ["theme"])) : createCommentVNode("", true),
|
|
2898
|
-
unref
|
|
2899
|
-
unref
|
|
2903
|
+
unref(getShowBread) && !unref(getShowTab) ? (openBlock(), createBlock(unref(_sfc_main$q), { key: 2 })) : createCommentVNode("", true),
|
|
2904
|
+
unref(getShowTab) ? (openBlock(), createElementBlock("div", _hoisted_1$5, [
|
|
2900
2905
|
createVNode(_sfc_main$x)
|
|
2901
2906
|
])) : createCommentVNode("", true)
|
|
2902
2907
|
], 2),
|
|
2903
|
-
unref
|
|
2908
|
+
unref(getShowTopMenu) ? (openBlock(), createElementBlock("div", _hoisted_2$3, [
|
|
2904
2909
|
createVNode(_sfc_main$b, {
|
|
2905
2910
|
isHorizontal: true,
|
|
2906
|
-
theme: unref
|
|
2907
|
-
splitType: unref
|
|
2908
|
-
menuMode: unref
|
|
2911
|
+
theme: unref(getHeaderTheme),
|
|
2912
|
+
splitType: unref(getSplitType),
|
|
2913
|
+
menuMode: unref(getMenuMode)
|
|
2909
2914
|
}, null, 8, ["theme", "splitType", "menuMode"])
|
|
2910
2915
|
])) : createCommentVNode("", true),
|
|
2911
2916
|
createElementVNode("div", {
|
|
2912
2917
|
class: "dt-header-action flex items-center",
|
|
2913
2918
|
style: normalizeStyle({
|
|
2914
|
-
"padding-right": unref
|
|
2919
|
+
"padding-right": unref(getShowSettingTheme) ? "" : "20px"
|
|
2915
2920
|
})
|
|
2916
2921
|
}, [
|
|
2917
|
-
unref
|
|
2918
|
-
unref
|
|
2919
|
-
unref
|
|
2920
|
-
unref
|
|
2921
|
-
unref
|
|
2922
|
+
unref(getShowSearch) ? (openBlock(), createBlock(unref(_sfc_main$p), { key: 0 })) : createCommentVNode("", true),
|
|
2923
|
+
unref(getShowNotice) ? (openBlock(), createBlock(unref(_sfc_main$n), { key: 1 })) : createCommentVNode("", true),
|
|
2924
|
+
unref(getShowUiSize) ? (openBlock(), createBlock(unref(_sfc_main$m), { key: 2 })) : createCommentVNode("", true),
|
|
2925
|
+
unref(getShowFullScreen) ? (openBlock(), createBlock(unref(_sfc_main$w), { key: 3 })) : createCommentVNode("", true),
|
|
2926
|
+
unref(getShowLocale) ? (openBlock(), createBlock(unref(_sfc_main$o), {
|
|
2922
2927
|
key: 4,
|
|
2923
2928
|
reload: true
|
|
2924
2929
|
})) : createCommentVNode("", true),
|
|
2925
|
-
createVNode(unref
|
|
2926
|
-
unref
|
|
2930
|
+
createVNode(unref(_sfc_main$l)),
|
|
2931
|
+
unref(getShowSettingTheme) ? (openBlock(), createBlock(unref(_sfc_main$g), { key: 5 })) : createCommentVNode("", true)
|
|
2927
2932
|
], 4)
|
|
2928
2933
|
]),
|
|
2929
2934
|
_: 1
|
|
@@ -2935,7 +2940,7 @@ function useMenuSwitch() {
|
|
|
2935
2940
|
const brokenRef = ref(false);
|
|
2936
2941
|
const { getMiniWidthNumber } = useMenu();
|
|
2937
2942
|
const getCollapsedWidth = computed(() => {
|
|
2938
|
-
return unref
|
|
2943
|
+
return unref(brokenRef) ? 0 : unref(getMiniWidthNumber);
|
|
2939
2944
|
});
|
|
2940
2945
|
function onBreakPointChange(broken) {
|
|
2941
2946
|
brokenRef.value = broken;
|
|
@@ -2945,11 +2950,11 @@ function useMenuSwitch() {
|
|
|
2945
2950
|
function useTrigger() {
|
|
2946
2951
|
const { getTrigger, getSplit } = useMenu();
|
|
2947
2952
|
const getShowTrigger = computed(() => {
|
|
2948
|
-
const trigger = unref
|
|
2949
|
-
return trigger && unref
|
|
2953
|
+
const trigger = unref(getTrigger);
|
|
2954
|
+
return trigger && unref(getSplit);
|
|
2950
2955
|
});
|
|
2951
2956
|
const getTriggerAttr = computed(() => {
|
|
2952
|
-
if (unref
|
|
2957
|
+
if (unref(getShowTrigger)) {
|
|
2953
2958
|
return {};
|
|
2954
2959
|
}
|
|
2955
2960
|
return {
|
|
@@ -2971,12 +2976,12 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
2971
2976
|
return (_ctx, _cache) => {
|
|
2972
2977
|
return openBlock(), createElementBlock("div", {
|
|
2973
2978
|
onClick: _cache[0] || (_cache[0] = withModifiers(
|
|
2974
|
-
(...args) => unref
|
|
2979
|
+
(...args) => unref(toggleCollapsed) && unref(toggleCollapsed)(...args),
|
|
2975
2980
|
["stop"]
|
|
2976
2981
|
))
|
|
2977
2982
|
}, [
|
|
2978
2983
|
createElementVNode("i", {
|
|
2979
|
-
class: normalizeClass(["i", unref
|
|
2984
|
+
class: normalizeClass(["i", unref(getCollapsed) ? "ant-design:double-right-outlined" : "ant-design:double-left-outlined"])
|
|
2980
2985
|
}, null, 2)
|
|
2981
2986
|
]);
|
|
2982
2987
|
};
|
|
@@ -2987,8 +2992,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
2987
2992
|
setup(__props) {
|
|
2988
2993
|
const { getCollapsed, getCanDrag, getMenuWidth } = useMenu();
|
|
2989
2994
|
const getDragBarStyle = computed(() => {
|
|
2990
|
-
if (!unref
|
|
2991
|
-
return { left: `${unref
|
|
2995
|
+
if (!unref(getCollapsed)) {
|
|
2996
|
+
return { left: `${unref(getMenuWidth)}px` };
|
|
2992
2997
|
}
|
|
2993
2998
|
return {};
|
|
2994
2999
|
});
|
|
@@ -2996,14 +3001,14 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
2996
3001
|
return [
|
|
2997
3002
|
"dt-darg-bar",
|
|
2998
3003
|
{
|
|
2999
|
-
"dt-darg-bar--hide": !unref
|
|
3004
|
+
"dt-darg-bar--hide": !unref(getCanDrag)
|
|
3000
3005
|
}
|
|
3001
3006
|
];
|
|
3002
3007
|
});
|
|
3003
3008
|
return (_ctx, _cache) => {
|
|
3004
3009
|
return openBlock(), createElementBlock("div", {
|
|
3005
|
-
class: normalizeClass(unref
|
|
3006
|
-
style: normalizeStyle(unref
|
|
3010
|
+
class: normalizeClass(unref(getClass)),
|
|
3011
|
+
style: normalizeStyle(unref(getDragBarStyle))
|
|
3007
3012
|
}, null, 6);
|
|
3008
3013
|
};
|
|
3009
3014
|
}
|
|
@@ -3028,11 +3033,11 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
3028
3033
|
const activeId = ref(null);
|
|
3029
3034
|
const activePath = ref(null);
|
|
3030
3035
|
const subMenus = ref([]);
|
|
3031
|
-
const getDomStyle = computed(() => setDomWidth(`${unref
|
|
3036
|
+
const getDomStyle = computed(() => setDomWidth(`${unref(subMenus)?.length ? unref(getMenuWidth) : MENU_WIDTH}px`));
|
|
3032
3037
|
const getWrapStyle = computed(() => setDomWidth(`${MENU_WIDTH}px`));
|
|
3033
3038
|
const getSubMenuStyle = computed(() => {
|
|
3034
3039
|
return {
|
|
3035
|
-
width: `${unref
|
|
3040
|
+
width: `${unref(getMenuWidth) - MENU_WIDTH}px`,
|
|
3036
3041
|
left: `${MENU_WIDTH}px`
|
|
3037
3042
|
};
|
|
3038
3043
|
});
|
|
@@ -3047,11 +3052,11 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
3047
3052
|
}
|
|
3048
3053
|
const getMenuEvents = {
|
|
3049
3054
|
onMouseleave: () => {
|
|
3050
|
-
setActive(unref
|
|
3055
|
+
setActive(unref(activePath));
|
|
3051
3056
|
}
|
|
3052
3057
|
};
|
|
3053
3058
|
const getItemEvents = (item) => {
|
|
3054
|
-
if (unref
|
|
3059
|
+
if (unref(getMixSideTrigger) === "hover") {
|
|
3055
3060
|
return {
|
|
3056
3061
|
onMouseenter: () => handleModuleClick(item.url, true),
|
|
3057
3062
|
onClick: () => handleModuleClick(item.url)
|
|
@@ -3077,28 +3082,28 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
3077
3082
|
watchEffect(() => {
|
|
3078
3083
|
if (!currentRoute || currentRoute.value.path === "/")
|
|
3079
3084
|
return;
|
|
3080
|
-
const { meta, path } = unref
|
|
3085
|
+
const { meta, path } = unref(currentRoute);
|
|
3081
3086
|
activePath.value = meta?.currentActiveMenu || path;
|
|
3082
|
-
setActive(unref
|
|
3087
|
+
setActive(unref(activePath));
|
|
3083
3088
|
});
|
|
3084
3089
|
return (_ctx, _cache) => {
|
|
3085
3090
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
3086
3091
|
createElementVNode("div", {
|
|
3087
3092
|
class: "h-full overflow-hidden",
|
|
3088
|
-
style: normalizeStyle(unref
|
|
3093
|
+
style: normalizeStyle(unref(getDomStyle))
|
|
3089
3094
|
}, null, 4),
|
|
3090
3095
|
createElementVNode("div", mergeProps({
|
|
3091
|
-
style: unref
|
|
3092
|
-
class: ["dt-mix-sider fixed top-0 left-0 h-full overflow-hidden", unref
|
|
3096
|
+
style: unref(getWrapStyle),
|
|
3097
|
+
class: ["dt-mix-sider fixed top-0 left-0 h-full overflow-hidden", unref(getMenuTheme)]
|
|
3093
3098
|
}, getMenuEvents), [
|
|
3094
3099
|
createVNode(_sfc_main$s, {
|
|
3095
3100
|
showTitle: false,
|
|
3096
3101
|
class: normalizeClass("justify-center z-10")
|
|
3097
3102
|
}),
|
|
3098
|
-
createVNode(unref
|
|
3103
|
+
createVNode(unref(DtScrollContainer), { class: "z-10" }, {
|
|
3099
3104
|
default: withCtx(() => [
|
|
3100
3105
|
createElementVNode("ul", _hoisted_1$4, [
|
|
3101
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref
|
|
3106
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(menuModules), (item) => {
|
|
3102
3107
|
return openBlock(), createElementBlock("li", mergeProps({
|
|
3103
3108
|
key: item.id,
|
|
3104
3109
|
class: ["py-3 cursor-pointer relative text-center", {
|
|
@@ -3120,9 +3125,9 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
3120
3125
|
subMenus.value?.length ? (openBlock(), createElementBlock("div", {
|
|
3121
3126
|
key: 0,
|
|
3122
3127
|
class: "fixed top-0 h-full sub-menu bg-white",
|
|
3123
|
-
style: normalizeStyle(unref
|
|
3128
|
+
style: normalizeStyle(unref(getSubMenuStyle))
|
|
3124
3129
|
}, [
|
|
3125
|
-
createVNode(unref
|
|
3130
|
+
createVNode(unref(DtScrollContainer), null, {
|
|
3126
3131
|
default: withCtx(() => [
|
|
3127
3132
|
createElementVNode("ul", _hoisted_3$2, [
|
|
3128
3133
|
(openBlock(true), createElementBlock(Fragment, null, renderList(subMenus.value, (menu) => {
|
|
@@ -3138,7 +3143,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
3138
3143
|
class: normalizeClass(["flex cursor-pointer", {
|
|
3139
3144
|
"active-menu": subMenu.url === activePath.value
|
|
3140
3145
|
}]),
|
|
3141
|
-
onClick: ($event) => unref
|
|
3146
|
+
onClick: ($event) => unref(go)(subMenu.url)
|
|
3142
3147
|
}, [
|
|
3143
3148
|
createElementVNode("i", {
|
|
3144
3149
|
class: normalizeClass(["i opacity-50 pr-2", subMenu.icon])
|
|
@@ -3152,7 +3157,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
3152
3157
|
class: normalizeClass(["sub-menu flex cursor-pointer", {
|
|
3153
3158
|
"active-menu": menu.url === activePath.value
|
|
3154
3159
|
}]),
|
|
3155
|
-
onClick: ($event) => unref
|
|
3160
|
+
onClick: ($event) => unref(go)(menu.url)
|
|
3156
3161
|
}, [
|
|
3157
3162
|
createElementVNode("i", {
|
|
3158
3163
|
class: normalizeClass(["i opacity-50 pr-2", menu.icon])
|
|
@@ -3199,7 +3204,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3199
3204
|
const dragBarRef = ref(null);
|
|
3200
3205
|
const sideRef = ref(null);
|
|
3201
3206
|
const hiddenDomStyle = computed(() => {
|
|
3202
|
-
const width = `${unref
|
|
3207
|
+
const width = `${unref(getRealWidth)}px`;
|
|
3203
3208
|
return {
|
|
3204
3209
|
width,
|
|
3205
3210
|
overflow: "hidden",
|
|
@@ -3213,60 +3218,60 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3213
3218
|
const {
|
|
3214
3219
|
menusRef
|
|
3215
3220
|
} = useSplitMenu(getSplitType);
|
|
3216
|
-
if (!unref
|
|
3221
|
+
if (!unref(menusRef)?.length)
|
|
3217
3222
|
return false;
|
|
3218
|
-
return unref
|
|
3223
|
+
return unref(getSplit) ? !unref(getMenuHidden) : true;
|
|
3219
3224
|
});
|
|
3220
3225
|
useDragLine(sideRef, dragBarRef);
|
|
3221
3226
|
const getSiderClass = computed(() => {
|
|
3222
3227
|
let cls = `dt-sideBar overflow-hidden z-10 `;
|
|
3223
|
-
if (unref
|
|
3228
|
+
if (unref(getMenuFixed)) {
|
|
3224
3229
|
cls += `dt-sideBar--fixed t-0 l-0 h-full `;
|
|
3225
3230
|
}
|
|
3226
|
-
if (unref
|
|
3231
|
+
if (unref(getIsMixMode)) {
|
|
3227
3232
|
cls += "dt-sideBar--mix ";
|
|
3228
3233
|
}
|
|
3229
3234
|
return cls;
|
|
3230
3235
|
});
|
|
3231
3236
|
const getSplitType = computed(() => {
|
|
3232
|
-
return unref
|
|
3237
|
+
return unref(getSplit) ? MenuSplitTye.LEFT : MenuSplitTye.NONE;
|
|
3233
3238
|
});
|
|
3234
3239
|
const getMode = computed(() => {
|
|
3235
|
-
return unref
|
|
3240
|
+
return unref(getSplit) ? MenuMode.INLINE : null;
|
|
3236
3241
|
});
|
|
3237
3242
|
const renderTrigger = h(_sfc_main$9);
|
|
3238
3243
|
return (_ctx, _cache) => {
|
|
3239
3244
|
const _component_ALayoutSider = LayoutSider;
|
|
3240
|
-
return unref
|
|
3245
|
+
return unref(getIsMixSidebar) ? (openBlock(), createBlock(_sfc_main$7, {
|
|
3241
3246
|
key: 0
|
|
3242
3247
|
})) : (openBlock(), createElementBlock(Fragment, {
|
|
3243
3248
|
key: 1
|
|
3244
|
-
}, [unref
|
|
3249
|
+
}, [unref(getMenuFixed) ? withDirectives((openBlock(), createElementBlock("div", {
|
|
3245
3250
|
key: 0,
|
|
3246
|
-
style: normalizeStyle(unref
|
|
3247
|
-
}, null, 4)), [[vShow, unref
|
|
3251
|
+
style: normalizeStyle(unref(hiddenDomStyle))
|
|
3252
|
+
}, null, 4)), [[vShow, unref(showClassSideBarRef)]]) : createCommentVNode("", true), withDirectives(createVNode(_component_ALayoutSider, mergeProps({
|
|
3248
3253
|
ref_key: "sideRef",
|
|
3249
3254
|
ref: sideRef,
|
|
3250
3255
|
collapsible: "",
|
|
3251
3256
|
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
|
|
3257
|
+
class: unref(getSiderClass),
|
|
3258
|
+
width: unref(getMenuWidth),
|
|
3259
|
+
collapsed: unref(getCollapsed),
|
|
3260
|
+
collapsedWidth: unref(getCollapsedWidth),
|
|
3261
|
+
onBreakpoint: unref(onBreakPointChange),
|
|
3262
|
+
theme: unref(getMenuTheme),
|
|
3263
|
+
trigger: unref(renderTrigger)
|
|
3264
|
+
}, unref(getTriggerAttr)), {
|
|
3260
3265
|
default: withCtx(() => [createVNode(_sfc_main$b, {
|
|
3261
|
-
theme: unref
|
|
3262
|
-
menuMode: unref
|
|
3263
|
-
splitType: unref
|
|
3266
|
+
theme: unref(getMenuTheme),
|
|
3267
|
+
menuMode: unref(getMode),
|
|
3268
|
+
splitType: unref(getSplitType)
|
|
3264
3269
|
}, null, 8, ["theme", "menuMode", "splitType"]), createVNode(_sfc_main$8, {
|
|
3265
3270
|
ref_key: "dragBarRef",
|
|
3266
3271
|
ref: dragBarRef
|
|
3267
3272
|
}, null, 512)]),
|
|
3268
3273
|
_: 1
|
|
3269
|
-
}, 16, ["class", "width", "collapsed", "collapsedWidth", "onBreakpoint", "theme", "trigger"]), [[vShow, unref
|
|
3274
|
+
}, 16, ["class", "width", "collapsed", "collapsedWidth", "onBreakpoint", "theme", "trigger"]), [[vShow, unref(showClassSideBarRef)]])], 64));
|
|
3270
3275
|
};
|
|
3271
3276
|
}
|
|
3272
3277
|
});
|
|
@@ -3283,50 +3288,50 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3283
3288
|
const { getCalcContentWidth, getIsMixMode, getSplit, getIsMixSidebar } = useMenu();
|
|
3284
3289
|
const { getShowMultipleTab, getMultipleTabPosIsTop } = useMultipleTab();
|
|
3285
3290
|
const getPlaceholderDomStyle = computed(() => {
|
|
3286
|
-
let height = unref
|
|
3287
|
-
if (unref
|
|
3288
|
-
height = unref
|
|
3291
|
+
let height = unref(getHeaderHeight);
|
|
3292
|
+
if (unref(getIsMixMode)) {
|
|
3293
|
+
height = unref(getShowMultipleTab) ? unref(getTabsHeight) : 0;
|
|
3289
3294
|
}
|
|
3290
3295
|
return {
|
|
3291
3296
|
height: `${height}px`
|
|
3292
3297
|
};
|
|
3293
3298
|
});
|
|
3294
3299
|
const getSplitType = computed(() => {
|
|
3295
|
-
return unref
|
|
3300
|
+
return unref(getSplit) ? MenuSplitTye.LEFT : MenuSplitTye.NONE;
|
|
3296
3301
|
});
|
|
3297
3302
|
const { menusRef } = useSplitMenu(getSplitType);
|
|
3298
3303
|
const getWrapStyle = computed(() => {
|
|
3299
3304
|
const style = {};
|
|
3300
|
-
if (unref
|
|
3301
|
-
style.width = useThemeStore().getMixSiderIsHasMenu ? unref
|
|
3302
|
-
} else if (unref
|
|
3305
|
+
if (unref(getIsMixSidebar)) {
|
|
3306
|
+
style.width = useThemeStore().getMixSiderIsHasMenu ? unref(getCalcContentWidth) : "calc(100% - 80px)";
|
|
3307
|
+
} else if (unref(getSplit) && !unref(menusRef)?.length) {
|
|
3303
3308
|
style.width = "100%";
|
|
3304
|
-
} else if (unref
|
|
3305
|
-
style.width = unref
|
|
3309
|
+
} else if (unref(getFixed)) {
|
|
3310
|
+
style.width = unref(getCalcContentWidth);
|
|
3306
3311
|
}
|
|
3307
|
-
if (unref
|
|
3312
|
+
if (unref(getShowFullHeaderRef))
|
|
3308
3313
|
style.top = "48px";
|
|
3309
3314
|
return style;
|
|
3310
3315
|
});
|
|
3311
3316
|
const getClass = computed(() => {
|
|
3312
3317
|
let cls = "transition-width duration-200 flex-auto";
|
|
3313
|
-
if (unref
|
|
3318
|
+
if (unref(getFixed)) {
|
|
3314
3319
|
cls += " fixed top-0 right-0 w-full";
|
|
3315
3320
|
}
|
|
3316
3321
|
return cls;
|
|
3317
3322
|
});
|
|
3318
3323
|
return (_ctx, _cache) => {
|
|
3319
3324
|
return openBlock(), createElementBlock("div", null, [
|
|
3320
|
-
unref
|
|
3325
|
+
unref(getFixed) ? (openBlock(), createElementBlock("div", {
|
|
3321
3326
|
key: 0,
|
|
3322
|
-
style: normalizeStyle(unref
|
|
3327
|
+
style: normalizeStyle(unref(getPlaceholderDomStyle))
|
|
3323
3328
|
}, null, 4)) : createCommentVNode("", true),
|
|
3324
3329
|
createElementVNode("div", {
|
|
3325
|
-
style: normalizeStyle(unref
|
|
3326
|
-
class: normalizeClass(unref
|
|
3330
|
+
style: normalizeStyle(unref(getWrapStyle)),
|
|
3331
|
+
class: normalizeClass(unref(getClass))
|
|
3327
3332
|
}, [
|
|
3328
|
-
unref
|
|
3329
|
-
unref
|
|
3333
|
+
unref(getShowInsetHeaderRef) ? (openBlock(), createBlock(_sfc_main$a, { key: 0 })) : createCommentVNode("", true),
|
|
3334
|
+
unref(getShowMultipleTab) && !unref(getMultipleTabPosIsTop) ? (openBlock(), createBlock(_sfc_main$x, { key: 1 })) : createCommentVNode("", true)
|
|
3330
3335
|
], 6)
|
|
3331
3336
|
]);
|
|
3332
3337
|
};
|
|
@@ -3337,7 +3342,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3337
3342
|
__name: "index",
|
|
3338
3343
|
setup(__props) {
|
|
3339
3344
|
const { getFooter } = useTheme();
|
|
3340
|
-
const { title, subTitle, height } = unref
|
|
3345
|
+
const { title, subTitle, height } = unref(getFooter);
|
|
3341
3346
|
const footerOptions = computed(() => {
|
|
3342
3347
|
return {
|
|
3343
3348
|
lineHeight: `${height - 1}px`,
|
|
@@ -3348,13 +3353,13 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3348
3353
|
};
|
|
3349
3354
|
});
|
|
3350
3355
|
return (_ctx, _cache) => {
|
|
3351
|
-
return openBlock(), createBlock(unref
|
|
3356
|
+
return openBlock(), createBlock(unref(LayoutFooter), {
|
|
3352
3357
|
class: "text-center p-0 w-full block border-t border-gray-200",
|
|
3353
|
-
style: normalizeStyle(unref
|
|
3358
|
+
style: normalizeStyle(unref(footerOptions))
|
|
3354
3359
|
}, {
|
|
3355
3360
|
default: withCtx(() => [
|
|
3356
|
-
createElementVNode("span", _hoisted_1$3, toDisplayString(unref
|
|
3357
|
-
createElementVNode("span", null, toDisplayString(unref
|
|
3361
|
+
createElementVNode("span", _hoisted_1$3, toDisplayString(unref(title)), 1),
|
|
3362
|
+
createElementVNode("span", null, toDisplayString(unref(subTitle)), 1)
|
|
3358
3363
|
]),
|
|
3359
3364
|
_: 1
|
|
3360
3365
|
}, 8, ["style"]);
|
|
@@ -3370,9 +3375,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3370
3375
|
const { getCanCache } = useMultipleTab();
|
|
3371
3376
|
const tabStore = useRouteReuseStore();
|
|
3372
3377
|
const { currentRoute } = useRouter();
|
|
3373
|
-
const contentMode = computed(() => unref
|
|
3378
|
+
const contentMode = computed(() => unref(currentRoute).meta.contentMode || unref(getLayoutContentMode));
|
|
3374
3379
|
function getTransitionName(route) {
|
|
3375
|
-
return route.meta.transitionName || unref
|
|
3380
|
+
return route.meta.transitionName || unref(getTransitionMode);
|
|
3376
3381
|
}
|
|
3377
3382
|
const getCaches = computed(() => {
|
|
3378
3383
|
return tabStore.getCachedTabList;
|
|
@@ -3382,8 +3387,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3382
3387
|
const _component_ALayoutContent = LayoutContent;
|
|
3383
3388
|
return openBlock(), createElementBlock("div", {
|
|
3384
3389
|
id: "dt-layout-content",
|
|
3385
|
-
class: normalizeClass([["dt-layout-content", unref
|
|
3386
|
-
loading: unref
|
|
3390
|
+
class: normalizeClass([["dt-layout-content", unref(contentMode)], "relative flex-auto overflow-x-hidden min-h-0 flex"]),
|
|
3391
|
+
loading: unref(getPageLoading) && unref(getOpenPageLoading)
|
|
3387
3392
|
}, [
|
|
3388
3393
|
createVNode(_component_ALayoutContent, null, {
|
|
3389
3394
|
default: withCtx(() => [
|
|
@@ -3395,9 +3400,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3395
3400
|
appear: ""
|
|
3396
3401
|
}, {
|
|
3397
3402
|
default: withCtx(() => [
|
|
3398
|
-
!route.meta.hideTab && unref
|
|
3403
|
+
!route.meta.hideTab && unref(getCanCache) ? (openBlock(), createBlock(KeepAlive, {
|
|
3399
3404
|
key: 0,
|
|
3400
|
-
include: unref
|
|
3405
|
+
include: unref(getCaches)
|
|
3401
3406
|
}, [
|
|
3402
3407
|
(openBlock(), createBlock(resolveDynamicComponent(Component), {
|
|
3403
3408
|
key: route.path
|
|
@@ -3637,17 +3642,17 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3637
3642
|
])
|
|
3638
3643
|
]),
|
|
3639
3644
|
createVNode(_sfc_main$2, {
|
|
3640
|
-
battery: unref
|
|
3641
|
-
"battery-status": unref
|
|
3642
|
-
"calc-discharging-time": unref
|
|
3643
|
-
"calc-charging-time": unref
|
|
3645
|
+
battery: unref(battery),
|
|
3646
|
+
"battery-status": unref(batteryStatus),
|
|
3647
|
+
"calc-discharging-time": unref(calcDischargingTime),
|
|
3648
|
+
"calc-charging-time": unref(calcChargingTime)
|
|
3644
3649
|
}, null, 8, ["battery", "battery-status", "calc-discharging-time", "calc-charging-time"])
|
|
3645
3650
|
], 64)) : (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
3646
|
-
unref
|
|
3651
|
+
unref(slots)?.icon ? (openBlock(), createBlock(unref(DtSlotContainer$1), {
|
|
3647
3652
|
key: 0,
|
|
3648
|
-
template: unref
|
|
3653
|
+
template: unref(slots).icon
|
|
3649
3654
|
}, null, 8, ["template"])) : createCommentVNode("", true),
|
|
3650
|
-
createElementVNode("span", _hoisted_6, toDisplayString(unref
|
|
3655
|
+
createElementVNode("span", _hoisted_6, toDisplayString(unref(getUserInfo)?.userNo), 1),
|
|
3651
3656
|
createVNode(_component_AInputPassword, {
|
|
3652
3657
|
class: "mt-2",
|
|
3653
3658
|
autofocus: "",
|
|
@@ -3665,12 +3670,12 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3665
3670
|
])
|
|
3666
3671
|
])),
|
|
3667
3672
|
createElementVNode("div", _hoisted_8, [
|
|
3668
|
-
createElementVNode("div", _hoisted_9, toDisplayString(unref
|
|
3669
|
-
createElementVNode("div", _hoisted_10, toDisplayString(unref
|
|
3673
|
+
createElementVNode("div", _hoisted_9, toDisplayString(unref(hour)) + ":" + toDisplayString(unref(minute)), 1),
|
|
3674
|
+
createElementVNode("div", _hoisted_10, toDisplayString(unref(month)) + "\u6708" + toDisplayString(unref(date)) + "\u53F7\uFF0C\u661F\u671F" + toDisplayString(unref(week)), 1)
|
|
3670
3675
|
]),
|
|
3671
3676
|
createElementVNode("div", _hoisted_11, [
|
|
3672
3677
|
createElementVNode("span", {
|
|
3673
|
-
class: normalizeClass([{ offline: !unref
|
|
3678
|
+
class: normalizeClass([{ offline: !unref(online) }, "network"])
|
|
3674
3679
|
}, _hoisted_13, 2),
|
|
3675
3680
|
_hoisted_14
|
|
3676
3681
|
])
|
|
@@ -3685,31 +3690,31 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3685
3690
|
const { getShowFullHeaderRef, getIsZH, getHeaderHeight, getUiSize, getLockscreen } = useHeader();
|
|
3686
3691
|
const { getSplit, getShowMenu, getShowSidebar, getIsMixSidebar } = useMenu();
|
|
3687
3692
|
const { getFooter, getShowFooter } = useTheme();
|
|
3688
|
-
const { height } = unref
|
|
3689
|
-
dayjs.locale(unref
|
|
3693
|
+
const { height } = unref(getFooter);
|
|
3694
|
+
dayjs.locale(unref(getIsZH) ? "zh-cn" : "en");
|
|
3690
3695
|
const useLockscreen = useLockscreenStore();
|
|
3691
3696
|
const isLock = computed(() => useLockscreen.isLock);
|
|
3692
3697
|
const layoutClass = computed(() => {
|
|
3693
3698
|
let cls = "ant-layout";
|
|
3694
|
-
if (unref
|
|
3699
|
+
if (unref(getIsMixSidebar)) {
|
|
3695
3700
|
cls += " ant-layout-has-sider";
|
|
3696
3701
|
}
|
|
3697
|
-
if (unref
|
|
3702
|
+
if (unref(getShowMenu)) {
|
|
3698
3703
|
cls += " flex flex-auto min-h-0 flex-row";
|
|
3699
3704
|
}
|
|
3700
3705
|
return cls;
|
|
3701
3706
|
});
|
|
3702
3707
|
const layoutOption = computed(() => {
|
|
3703
|
-
if (unref
|
|
3708
|
+
if (unref(getSplit)) {
|
|
3704
3709
|
return {
|
|
3705
|
-
paddingTop: unref
|
|
3710
|
+
paddingTop: unref(getHeaderHeight) + "px",
|
|
3706
3711
|
background: "#f0f2f5"
|
|
3707
3712
|
};
|
|
3708
3713
|
}
|
|
3709
3714
|
});
|
|
3710
3715
|
const getContentStyle = computed(() => {
|
|
3711
3716
|
return {
|
|
3712
|
-
flex: unref
|
|
3717
|
+
flex: unref(getSplit) ? `0 0 calc(100% - ${unref(getShowFooter) || 0}px)` : `0 0 calc(100% - ${unref(getShowFooter) ? height : 0}px - ${unref(getHeaderHeight)}px)`,
|
|
3713
3718
|
overflowY: "auto"
|
|
3714
3719
|
};
|
|
3715
3720
|
});
|
|
@@ -3734,37 +3739,37 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3734
3739
|
const _component_ALayout = Layout;
|
|
3735
3740
|
const _component_AConfigProvider = ConfigProvider;
|
|
3736
3741
|
return openBlock(), createElementBlock("div", {
|
|
3737
|
-
class: normalizeClass(["dt-theme w-full h-full", `dt-theme-${unref
|
|
3742
|
+
class: normalizeClass(["dt-theme w-full h-full", `dt-theme-${unref(getUiSize)}`])
|
|
3738
3743
|
}, [
|
|
3739
|
-
!unref
|
|
3744
|
+
!unref(isLock) ? (openBlock(), createBlock(_component_AConfigProvider, {
|
|
3740
3745
|
key: 0,
|
|
3741
|
-
locale: unref
|
|
3742
|
-
"component-size": unref
|
|
3746
|
+
locale: unref(getIsZH) ? unref(zhCN) : unref(en),
|
|
3747
|
+
"component-size": unref(getUiSize)
|
|
3743
3748
|
}, {
|
|
3744
3749
|
default: withCtx(() => [
|
|
3745
|
-
unref
|
|
3750
|
+
unref(currentRoute)?.name && unref(currentRoute).meta?.requiresAuth !== false ? (openBlock(), createBlock(_component_ALayout, {
|
|
3746
3751
|
key: 0,
|
|
3747
3752
|
class: "w-full h-full flex"
|
|
3748
3753
|
}, {
|
|
3749
3754
|
default: withCtx(() => [
|
|
3750
3755
|
createVNode(_sfc_main$A),
|
|
3751
|
-
unref
|
|
3756
|
+
unref(getShowFullHeaderRef) ? (openBlock(), createBlock(_sfc_main$a, {
|
|
3752
3757
|
key: 0,
|
|
3753
3758
|
fixed: ""
|
|
3754
3759
|
})) : createCommentVNode("", true),
|
|
3755
3760
|
createVNode(_component_ALayout, {
|
|
3756
|
-
class: normalizeClass(unref
|
|
3757
|
-
style: normalizeStyle(unref
|
|
3761
|
+
class: normalizeClass(unref(layoutClass)),
|
|
3762
|
+
style: normalizeStyle(unref(layoutOption))
|
|
3758
3763
|
}, {
|
|
3759
3764
|
default: withCtx(() => [
|
|
3760
|
-
unref
|
|
3765
|
+
unref(getShowSidebar) ? (openBlock(), createBlock(_sfc_main$6, { key: 0 })) : createCommentVNode("", true),
|
|
3761
3766
|
createVNode(_component_ALayout, { class: "dt-theme-main flex w-full h-ful transition-width duration-200" }, {
|
|
3762
3767
|
default: withCtx(() => [
|
|
3763
3768
|
createVNode(_sfc_main$5),
|
|
3764
3769
|
createVNode(_sfc_main$3, {
|
|
3765
|
-
style: normalizeStyle(unref
|
|
3770
|
+
style: normalizeStyle(unref(getContentStyle))
|
|
3766
3771
|
}, null, 8, ["style"]),
|
|
3767
|
-
unref
|
|
3772
|
+
unref(getFooter) && unref(getFooter)["show"] ? (openBlock(), createBlock(_sfc_main$4, { key: 0 })) : createCommentVNode("", true)
|
|
3768
3773
|
]),
|
|
3769
3774
|
_: 1
|
|
3770
3775
|
})
|
|
@@ -3773,16 +3778,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3773
3778
|
}, 8, ["class", "style"])
|
|
3774
3779
|
]),
|
|
3775
3780
|
_: 1
|
|
3776
|
-
})) : (openBlock(), createBlock(unref
|
|
3781
|
+
})) : (openBlock(), createBlock(unref(RouterView), { key: 1 }))
|
|
3777
3782
|
]),
|
|
3778
3783
|
_: 1
|
|
3779
3784
|
}, 8, ["locale", "component-size"])) : createCommentVNode("", true),
|
|
3780
|
-
unref
|
|
3785
|
+
unref(getLockscreen) && unref(isLock) && unref(currentRoute)?.name && unref(currentRoute).meta?.requiresAuth !== false ? (openBlock(), createBlock(Transition, {
|
|
3781
3786
|
key: 1,
|
|
3782
3787
|
name: "fade-slide"
|
|
3783
3788
|
}, {
|
|
3784
3789
|
default: withCtx(() => [
|
|
3785
|
-
createVNode(unref
|
|
3790
|
+
createVNode(unref(_sfc_main$1))
|
|
3786
3791
|
]),
|
|
3787
3792
|
_: 1
|
|
3788
3793
|
})) : createCommentVNode("", true)
|
|
@@ -3940,7 +3945,7 @@ const ZH = {
|
|
|
3940
3945
|
"NUMBER": "\u5E8F\u53F7",
|
|
3941
3946
|
"ACTIONS": "\u64CD\u4F5C",
|
|
3942
3947
|
"TOTAL_PAGE": "\u603B\u5171{total}\u6761",
|
|
3943
|
-
"FILTER": "\
|
|
3948
|
+
"FILTER": "\u641C\u7D22...",
|
|
3944
3949
|
"EXPAND_ALL": "\u5C55\u5F00\u5168\u90E8",
|
|
3945
3950
|
"COLLAPSE_ALL": "\u6298\u53E0\u5168\u90E8",
|
|
3946
3951
|
"SELECT_ALL1": "\u9009\u62E9\u5168\u90E8",
|