@dt-frames/ui 2.0.4 → 2.0.5
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/components/curd/index.js +80 -75
- package/es/components/curd/src/components/Curd.d.ts +0 -8
- package/es/components/curd/src/props.d.ts +0 -4
- package/es/components/form/index.d.ts +20 -53
- package/es/components/form/index.js +17 -27
- package/es/components/form/index.less +8 -3
- package/es/components/form/src/index.d.ts +16 -41
- package/es/components/source/index.js +8 -5
- package/es/components/source/types/source.type.d.ts +1 -0
- package/es/components/table/index.js +145 -95
- package/es/components/table/index.less +26 -5
- package/es/components/table/src/components/TableAction.d.ts +1 -1
- package/es/components/table/src/index.d.ts +10 -0
- package/es/components/table/src/props.d.ts +4 -0
- package/es/components/tree/index.d.ts +2 -0
- package/es/components/tree/index.js +1087 -0
- package/es/components/tree/index.less +119 -0
- package/es/components/tree/src/basicProps.d.ts +146 -0
- package/es/components/tree/src/components/ContextMenu.d.ts +64 -0
- package/es/components/tree/src/components/TreeHeader.d.ts +98 -0
- package/es/components/tree/src/enums/index.d.ts +6 -0
- package/es/components/tree/src/hooks/useContextMenu.d.ts +2 -0
- package/es/components/tree/src/hooks/useTree.d.ts +14 -0
- package/es/components/tree/src/index.d.ts +6526 -0
- package/es/components/tree/src/type/menu.d.ts +33 -0
- package/es/components/tree/src/type/tree.d.ts +55 -0
- package/es/components/tree/src/utils/tree.d.ts +5 -0
- package/es/packages/ui/src/assets/locales/en.d.ts +101 -0
- package/es/packages/ui/src/assets/locales/index.d.ts +2 -0
- package/es/packages/ui/src/assets/locales/zh.d.ts +103 -0
- package/es/packages/ui/src/components/container/index.d.ts +94 -0
- package/es/packages/ui/src/components/container/src/components/bar.d.ts +14 -0
- package/es/packages/ui/src/components/container/src/components/scroll-bar.d.ts +70 -0
- package/es/packages/ui/src/components/container/src/hooks/scroll.d.ts +10 -0
- package/es/packages/ui/src/components/container/src/scroll-container.d.ts +76 -0
- package/es/packages/ui/src/components/container/src/slot-container.d.ts +20 -0
- package/es/packages/ui/src/components/container/src/types/scroll.type.d.ts +22 -0
- package/es/packages/ui/src/components/container/src/utils/scroll.d.ts +5 -0
- package/es/packages/ui/src/global.d.ts +7 -0
- package/es/packages/ui/src/theme/index.d.ts +10 -0
- package/es/packages/ui/src/theme/src/components/content/index.d.ts +27 -0
- package/es/packages/ui/src/theme/src/components/feature/back-top.d.ts +5 -0
- package/es/packages/ui/src/theme/src/components/feature/index.d.ts +7 -0
- package/es/packages/ui/src/theme/src/components/footer/index.d.ts +31 -0
- package/es/packages/ui/src/theme/src/components/header/components/bread-crumb.d.ts +6 -0
- package/es/packages/ui/src/theme/src/components/header/components/fullscreen.d.ts +5 -0
- package/es/packages/ui/src/theme/src/components/header/components/index.d.ts +11 -0
- package/es/packages/ui/src/theme/src/components/header/components/lang-picker.d.ts +23 -0
- package/es/packages/ui/src/theme/src/components/header/components/logo.d.ts +56 -0
- package/es/packages/ui/src/theme/src/components/header/components/menu-filter.d.ts +22 -0
- package/es/packages/ui/src/theme/src/components/header/components/notify.d.ts +24 -0
- package/es/packages/ui/src/theme/src/components/header/components/setting-theme.d.ts +223 -0
- package/es/packages/ui/src/theme/src/components/header/components/size.d.ts +282 -0
- package/es/packages/ui/src/theme/src/components/header/components/theme-drawer/feature.d.ts +138 -0
- package/es/packages/ui/src/theme/src/components/header/components/theme-drawer/index.d.ts +3 -0
- package/es/packages/ui/src/theme/src/components/header/components/theme-drawer/menu-type.d.ts +16 -0
- package/es/packages/ui/src/theme/src/components/header/components/theme-drawer/select.d.ts +58 -0
- package/es/packages/ui/src/theme/src/components/header/components/theme-drawer/switch.d.ts +49 -0
- package/es/packages/ui/src/theme/src/components/header/components/trigger.d.ts +10 -0
- package/es/packages/ui/src/theme/src/components/header/components/user-info.d.ts +37 -0
- package/es/packages/ui/src/theme/src/components/header/helper/change-theme.d.ts +13 -0
- package/es/packages/ui/src/theme/src/components/header/helper/menu-tree.d.ts +4 -0
- package/es/packages/ui/src/theme/src/components/header/index.d.ts +720 -0
- package/es/packages/ui/src/theme/src/components/header/multiple-header.d.ts +806 -0
- package/es/packages/ui/src/theme/src/components/sider/components/basic-menu/basic-menu-item.d.ts +62 -0
- package/es/packages/ui/src/theme/src/components/sider/components/basic-menu/basic-menu.d.ts +207 -0
- package/es/packages/ui/src/theme/src/components/sider/components/basic-menu/basic-sub-menu-item.d.ts +127 -0
- package/es/packages/ui/src/theme/src/components/sider/components/basic-menu/menu-item-content.d.ts +26 -0
- package/es/packages/ui/src/theme/src/components/sider/components/drag-bar.d.ts +14 -0
- package/es/packages/ui/src/theme/src/components/sider/components/layout-menu.d.ts +22 -0
- package/es/packages/ui/src/theme/src/components/sider/components/props.d.ts +69 -0
- package/es/packages/ui/src/theme/src/components/sider/components/sider-trigger.d.ts +17 -0
- package/es/packages/ui/src/theme/src/components/sider/helper/sider.d.ts +12 -0
- package/es/packages/ui/src/theme/src/components/sider/helper/split-menu.d.ts +10 -0
- package/es/packages/ui/src/theme/src/components/sider/index.d.ts +235 -0
- package/es/packages/ui/src/theme/src/components/sider/mix-sider.d.ts +167 -0
- package/es/packages/ui/src/theme/src/components/tabs/components/TabContent.d.ts +6 -0
- package/es/packages/ui/src/theme/src/components/tabs/components/TabRedo.d.ts +21 -0
- package/es/packages/ui/src/theme/src/components/tabs/components/index.d.ts +3 -0
- package/es/packages/ui/src/theme/src/components/tabs/hooks/useMultifyTabs.d.ts +7 -0
- package/es/packages/ui/src/theme/src/components/tabs/hooks/useTabDropdown.d.ts +6 -0
- package/es/packages/ui/src/theme/src/components/tabs/index.d.ts +63 -0
- package/es/packages/ui/src/theme/src/components/tabs/types/tabs.type.d.ts +7 -0
- package/es/packages/ui/src/theme/src/enums/index.d.ts +1 -0
- package/es/packages/ui/src/theme/src/enums/theme.enum.d.ts +34 -0
- package/es/packages/ui/src/theme/src/hooks/index.d.ts +6 -0
- package/es/packages/ui/src/theme/src/hooks/useDragLine.d.ts +2 -0
- package/es/packages/ui/src/theme/src/hooks/useHeader.d.ts +25 -0
- package/es/packages/ui/src/theme/src/hooks/useMenu.d.ts +29 -0
- package/es/packages/ui/src/theme/src/hooks/useMultifyTab.d.ts +8 -0
- package/es/packages/ui/src/theme/src/hooks/useOpenKeys.d.ts +7 -0
- package/es/packages/ui/src/theme/src/hooks/useTheme.d.ts +9 -0
- package/es/packages/ui/src/theme/src/index.d.ts +1851 -0
- package/es/packages/ui/src/theme/src/setting/theme.setting.d.ts +2 -0
- package/es/packages/ui/src/theme/src/stores/index.d.ts +3 -0
- package/es/packages/ui/src/theme/src/stores/routeReuse.store.d.ts +23 -0
- package/es/packages/ui/src/theme/src/stores/theme.store.d.ts +18 -0
- package/es/packages/ui/src/theme/src/types/index.d.ts +3 -0
- package/es/packages/ui/src/theme/src/types/menu.type.d.ts +15 -0
- package/es/packages/ui/src/theme/src/types/theme.type.d.ts +62 -0
- package/es/packages/ui/src/utils/withInstall.d.ts +4 -0
- package/es/theme/index.d.ts +2 -1
- package/es/theme/index.js +658 -665
- package/es/theme/index.less +55 -0
- package/es/theme/src/components/header/components/logo.d.ts +22 -0
- package/es/theme/src/components/header/index.d.ts +87 -0
- package/es/theme/src/components/header/multiple-header.d.ts +88 -0
- package/es/theme/src/components/sider/index.d.ts +22 -0
- package/es/theme/src/components/sider/mix-sider.d.ts +22 -0
- package/es/theme/src/hooks/useMultifyTab.d.ts +1 -0
- package/es/theme/src/index.d.ts +197 -0
- package/es/theme/src/types/theme.type.d.ts +1 -0
- package/index.d.ts +2 -1
- package/index.js +6 -2
- package/package.json +4 -2
- package/tsconfig.json +1 -0
- package/vite.config.ts +1 -0
|
@@ -4,7 +4,7 @@ import "ant-design-vue/es/form/style";
|
|
|
4
4
|
import "ant-design-vue/es/row/style";
|
|
5
5
|
import { DtCache, CacheKey, deepMerge, Pages, useGo, useRedo, Language, useAppStore, isNumber, useI18n, isString, isFunction, error, useSlots, isArray, isBoolean, isNull, dispatchResize, isObject, isNullAndUnDef, isEmpty, useTimeoutFn, useApp, off, on, windowResizeFn, useMessage } from "@dt-frames/core";
|
|
6
6
|
import { isEqual, omit, cloneDeep, upperFirst, uniqBy, set } from "lodash-es";
|
|
7
|
-
import { Input, Select, TreeSelect, Radio, Checkbox, AutoComplete, Cascader, DatePicker, InputNumber, Switch, TimePicker, Slider, Rate, Divider, Col, Tooltip, Form, FormItem, Modal
|
|
7
|
+
import { Input, Select, TreeSelect, Radio, Checkbox, AutoComplete, Cascader, DatePicker, InputNumber, Switch, TimePicker, Slider, Rate, Divider, Col, Tooltip, Form, FormItem, Modal } from "ant-design-vue";
|
|
8
8
|
import { defineStore } from "pinia";
|
|
9
9
|
import "ant-design-vue/es/radio/style";
|
|
10
10
|
import "ant-design-vue/es/cascader/style";
|
|
@@ -29,6 +29,7 @@ var MenuType = /* @__PURE__ */ ((MenuType2) => {
|
|
|
29
29
|
MenuType2["SIDE"] = "sidebar";
|
|
30
30
|
MenuType2["TOP_MENU"] = "top-menu";
|
|
31
31
|
MenuType2["MIX"] = "mix";
|
|
32
|
+
MenuType2["MIX_SIDEBAR"] = "mix-sidebar";
|
|
32
33
|
return MenuType2;
|
|
33
34
|
})(MenuType || {});
|
|
34
35
|
var MenuMode = /* @__PURE__ */ ((MenuMode2) => {
|
|
@@ -80,7 +81,8 @@ const defaultThemeConf = {
|
|
|
80
81
|
menuWidth: 240,
|
|
81
82
|
trigger: true,
|
|
82
83
|
type: MenuType.SIDE,
|
|
83
|
-
mode: MenuMode.INLINE
|
|
84
|
+
mode: MenuMode.INLINE,
|
|
85
|
+
mixSideTrigger: "hover"
|
|
84
86
|
},
|
|
85
87
|
footerOptions: {
|
|
86
88
|
show: false,
|
|
@@ -101,7 +103,8 @@ const useThemeStore = defineStore({
|
|
|
101
103
|
id: "dt-theme",
|
|
102
104
|
state: () => ({
|
|
103
105
|
themeConf: DtCache.getLocal(CacheKey.THEME) ?? defaultThemeConf,
|
|
104
|
-
pageLoading: false
|
|
106
|
+
pageLoading: false,
|
|
107
|
+
mixSiderHasSubMenu: false
|
|
105
108
|
}),
|
|
106
109
|
getters: {
|
|
107
110
|
getThemeConf() {
|
|
@@ -121,6 +124,9 @@ const useThemeStore = defineStore({
|
|
|
121
124
|
},
|
|
122
125
|
getPageLoading() {
|
|
123
126
|
return this.pageLoading;
|
|
127
|
+
},
|
|
128
|
+
getMixSiderIsHasMenu() {
|
|
129
|
+
return this.mixSiderHasSubMenu;
|
|
124
130
|
}
|
|
125
131
|
},
|
|
126
132
|
actions: {
|
|
@@ -128,6 +134,9 @@ const useThemeStore = defineStore({
|
|
|
128
134
|
let newThemeConf = deepMerge(this.themeConf, options);
|
|
129
135
|
this.themeConf = deepMerge(defaultThemeConf, newThemeConf);
|
|
130
136
|
DtCache.setLocal(CacheKey.THEME, this.themeConf);
|
|
137
|
+
},
|
|
138
|
+
setMixSiderIsHasMenu(val) {
|
|
139
|
+
this.mixSiderHasSubMenu = val;
|
|
131
140
|
}
|
|
132
141
|
}
|
|
133
142
|
});
|
|
@@ -283,8 +292,18 @@ function useMenu() {
|
|
|
283
292
|
const getIsMixMode = computed(() => {
|
|
284
293
|
return unref(getMenuMode) === MenuMode.INLINE && unref(getMenuType) === MenuType.MIX;
|
|
285
294
|
});
|
|
286
|
-
const
|
|
287
|
-
const
|
|
295
|
+
const getIsMixSidebar = computed(() => unref(getMenuType) === MenuType.MIX_SIDEBAR);
|
|
296
|
+
const getMenuWidth = computed(() => {
|
|
297
|
+
if (unref(getIsMixMode)) {
|
|
298
|
+
return Number(getMenuConf.menuWidth) - 40;
|
|
299
|
+
} else if (unref(getIsMixSidebar)) {
|
|
300
|
+
return Number(getMenuConf.menuWidth) - 10;
|
|
301
|
+
} else {
|
|
302
|
+
return Number(getMenuConf.menuWidth);
|
|
303
|
+
}
|
|
304
|
+
});
|
|
305
|
+
const getMixSideTrigger = computed(() => getMenuConf.mixSideTrigger);
|
|
306
|
+
const getLogoWidth = computed(() => unref(getIsMixSidebar) ? "80px" : getMenuConf.menuWidth);
|
|
288
307
|
const getMenuType = computed(() => getMenuConf.type);
|
|
289
308
|
const getIsTopMenu = computed(() => unref(getMenuType) === MenuType.TOP_MENU);
|
|
290
309
|
const getMenuMode = computed(() => getMenuConf.mode);
|
|
@@ -326,7 +345,9 @@ function useMenu() {
|
|
|
326
345
|
getRealWidth,
|
|
327
346
|
getCalcContentWidth,
|
|
328
347
|
getIsMixMode,
|
|
348
|
+
getIsMixSidebar,
|
|
329
349
|
getCanDrag,
|
|
350
|
+
getMixSideTrigger,
|
|
330
351
|
toggleCollapsed,
|
|
331
352
|
setThemeStore
|
|
332
353
|
};
|
|
@@ -335,12 +356,14 @@ function useMultipleTab() {
|
|
|
335
356
|
const { getRouteReuseConf } = useThemeStore();
|
|
336
357
|
const getShowMultipleTab = computed(() => getRouteReuseConf.show);
|
|
337
358
|
const getShowQuick = computed(() => getRouteReuseConf.showQuick);
|
|
359
|
+
const getMultipleTabPosIsTop = computed(() => getRouteReuseConf.position === "top");
|
|
338
360
|
const getShowRedo = computed(() => getRouteReuseConf.showRedo);
|
|
339
361
|
const getCanCache = computed(() => getRouteReuseConf.cache);
|
|
340
362
|
const getCanDrag = computed(() => getRouteReuseConf.canDrag);
|
|
341
363
|
return {
|
|
342
364
|
getShowMultipleTab,
|
|
343
365
|
getShowQuick,
|
|
366
|
+
getMultipleTabPosIsTop,
|
|
344
367
|
getShowRedo,
|
|
345
368
|
getCanCache,
|
|
346
369
|
getCanDrag
|
|
@@ -359,12 +382,12 @@ function useHeader() {
|
|
|
359
382
|
getMenuMode,
|
|
360
383
|
getSplit,
|
|
361
384
|
getIsTopMenu,
|
|
362
|
-
|
|
385
|
+
getIsMixSidebar
|
|
363
386
|
} = useMenu();
|
|
364
|
-
const { getShowMultipleTab } = useMultipleTab();
|
|
387
|
+
const { getShowMultipleTab, getMultipleTabPosIsTop } = useMultipleTab();
|
|
365
388
|
const getHeaderTheme = computed(() => getHeaderConf.theme);
|
|
366
389
|
const getFixed = computed(() => getHeaderConf.fixed);
|
|
367
|
-
const getShowHeaderLogo = computed(() => unref(getShowLogo) && !unref(getIsSidebarType));
|
|
390
|
+
const getShowHeaderLogo = computed(() => unref(getShowLogo) && !unref(getIsSidebarType) && !unref(getIsMixSidebar));
|
|
368
391
|
const getShowSearch = computed(() => getHeaderConf.showSearch);
|
|
369
392
|
const getShowHeaderTrigger = computed(() => {
|
|
370
393
|
if (unref(getMenuType) === MenuType.TOP_MENU || !unref(getShowMenu) || unref(getMenuHidden)) {
|
|
@@ -382,19 +405,20 @@ function useHeader() {
|
|
|
382
405
|
const getShowLocale = computed(() => getHeaderConf.showLocaleSwitch);
|
|
383
406
|
const getShowSettingTheme = computed(() => getHeaderConf.showSettingTheme);
|
|
384
407
|
const getShowFullHeaderRef = computed(() => {
|
|
385
|
-
return !unref(getIsSidebarType) && !unref(getIsTopMenu);
|
|
408
|
+
return !unref(getIsSidebarType) && !unref(getIsMixSidebar) && !unref(getIsTopMenu);
|
|
386
409
|
});
|
|
387
410
|
const getHeaderHeight = computed(() => {
|
|
388
411
|
let height = 0;
|
|
389
412
|
height += HEADER_HEIGHT;
|
|
390
|
-
|
|
413
|
+
console.log(getMultipleTabPosIsTop);
|
|
414
|
+
if (unref(getShowMultipleTab) && !unref(getSplit) && !unref(getMultipleTabPosIsTop)) {
|
|
391
415
|
height += TABS_HEIGHT;
|
|
392
416
|
}
|
|
393
417
|
return height;
|
|
394
418
|
});
|
|
395
419
|
const getTabsHeight = computed(() => TABS_HEIGHT);
|
|
396
420
|
const getShowInsetHeaderRef = computed(() => {
|
|
397
|
-
return unref(getIsSidebarType) || unref(getIsTopMenu);
|
|
421
|
+
return unref(getIsSidebarType) || unref(getIsTopMenu) || unref(getIsMixSidebar);
|
|
398
422
|
});
|
|
399
423
|
const getShowBackToTop = computed(() => getHeaderConf.showBackToTop);
|
|
400
424
|
const getIsZH = computed(() => {
|
|
@@ -581,14 +605,6 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
581
605
|
};
|
|
582
606
|
}
|
|
583
607
|
});
|
|
584
|
-
const _export_sfc = (sfc, props) => {
|
|
585
|
-
const target = sfc.__vccOpts || sfc;
|
|
586
|
-
for (const [key, val] of props) {
|
|
587
|
-
target[key] = val;
|
|
588
|
-
}
|
|
589
|
-
return target;
|
|
590
|
-
};
|
|
591
|
-
const RadioButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/form/src/components/radioButton.vue"]]);
|
|
592
608
|
const _hoisted_1$2 = { class: "input-with-dialog" };
|
|
593
609
|
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
594
610
|
__name: "formInputUseDialog",
|
|
@@ -624,15 +640,14 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
624
640
|
key: 0,
|
|
625
641
|
class: "i mdi:close-circle",
|
|
626
642
|
onClick: clearProps
|
|
627
|
-
})) : createCommentVNode("
|
|
643
|
+
})) : createCommentVNode("", true)
|
|
628
644
|
]);
|
|
629
645
|
};
|
|
630
646
|
}
|
|
631
647
|
});
|
|
632
|
-
const DtFormInputDialog = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/form/src/components/formInputUseDialog.vue"]]);
|
|
633
648
|
const components = {
|
|
634
649
|
Input,
|
|
635
|
-
InputWithDialog:
|
|
650
|
+
InputWithDialog: _sfc_main$c,
|
|
636
651
|
InputTextArea: Input.TextArea,
|
|
637
652
|
InputSearch: Input.Search,
|
|
638
653
|
InputGroup: Input.Group,
|
|
@@ -641,7 +656,7 @@ const components = {
|
|
|
641
656
|
TreeSelect,
|
|
642
657
|
Radio,
|
|
643
658
|
RadioGroup: Radio.Group,
|
|
644
|
-
RadioButtonGroup,
|
|
659
|
+
RadioButtonGroup: _sfc_main$d,
|
|
645
660
|
Checkbox,
|
|
646
661
|
CheckboxGroup: Checkbox.Group,
|
|
647
662
|
AutoComplete,
|
|
@@ -1026,7 +1041,6 @@ const _sfc_main$b = {
|
|
|
1026
1041
|
};
|
|
1027
1042
|
}
|
|
1028
1043
|
};
|
|
1029
|
-
const DtFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/form/src/components/FormItem.vue"]]);
|
|
1030
1044
|
const _hoisted_1$1 = {
|
|
1031
1045
|
key: 0,
|
|
1032
1046
|
className: "preIcon pr-1"
|
|
@@ -1139,8 +1153,8 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
1139
1153
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.buttonList, (button) => {
|
|
1140
1154
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
1141
1155
|
(button.show === void 0 ? true : button.show) ? withDirectives((openBlock(), createBlock(_component_AButton, {
|
|
1156
|
+
class: normalizeClass(["items-center", button.class]),
|
|
1142
1157
|
type: button.type,
|
|
1143
|
-
class: normalizeClass(button.class),
|
|
1144
1158
|
loading: button.loading,
|
|
1145
1159
|
disabled: button.disabled,
|
|
1146
1160
|
key: unref(key),
|
|
@@ -1149,18 +1163,18 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
1149
1163
|
icon: withCtx(() => [
|
|
1150
1164
|
button.preIcon ? withDirectives((openBlock(), createElementBlock("span", _hoisted_1$1, null, 512)), [
|
|
1151
1165
|
[_directive_icon, button.preIcon]
|
|
1152
|
-
]) : createCommentVNode("
|
|
1166
|
+
]) : createCommentVNode("", true)
|
|
1153
1167
|
]),
|
|
1154
1168
|
default: withCtx(() => [
|
|
1155
|
-
createTextVNode(" " + toDisplayString(unref(t)(button.
|
|
1169
|
+
createTextVNode(" " + toDisplayString(unref(t)(button.label)) + " ", 1),
|
|
1156
1170
|
button.postIcon ? withDirectives((openBlock(), createElementBlock("span", _hoisted_2, null, 512)), [
|
|
1157
1171
|
[_directive_icon, button.postIcon]
|
|
1158
|
-
]) : createCommentVNode("
|
|
1172
|
+
]) : createCommentVNode("", true)
|
|
1159
1173
|
]),
|
|
1160
1174
|
_: 2
|
|
1161
1175
|
}, 1032, ["type", "class", "loading", "disabled", "onClick"])), [
|
|
1162
1176
|
[_directive_auth, button.auth]
|
|
1163
|
-
]) : createCommentVNode("
|
|
1177
|
+
]) : createCommentVNode("", true)
|
|
1164
1178
|
], 64);
|
|
1165
1179
|
}), 256)),
|
|
1166
1180
|
unref(showAdvanceRef) ? (openBlock(), createBlock(_component_AButton, {
|
|
@@ -1170,29 +1184,27 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
1170
1184
|
onClick: toggleAdvanced
|
|
1171
1185
|
}, {
|
|
1172
1186
|
default: withCtx(() => [
|
|
1173
|
-
createCommentVNode(" \u6536\u8D77 | \u5C55\u5F00 "),
|
|
1174
1187
|
createElementVNode("span", _hoisted_3, toDisplayString(advancedRef.value ? unref(t)("UI.ADVANCED") : unref(t)("UI.EXPAND")), 1),
|
|
1175
1188
|
createElementVNode("span", {
|
|
1176
1189
|
class: normalizeClass(unref(getAdvanceClass))
|
|
1177
1190
|
}, _hoisted_5, 2)
|
|
1178
1191
|
]),
|
|
1179
1192
|
_: 1
|
|
1180
|
-
})) : createCommentVNode("
|
|
1193
|
+
})) : createCommentVNode("", true)
|
|
1181
1194
|
]),
|
|
1182
1195
|
_: 1
|
|
1183
1196
|
}, 8, ["style"])
|
|
1184
1197
|
]),
|
|
1185
1198
|
_: 1
|
|
1186
|
-
}, 16)) : createCommentVNode("
|
|
1199
|
+
}, 16)) : createCommentVNode("", true);
|
|
1187
1200
|
};
|
|
1188
1201
|
}
|
|
1189
1202
|
});
|
|
1190
|
-
const DtFormButtons = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/form/src/components/FormButtons.vue"]]);
|
|
1191
1203
|
const SEARCH_BTN_NAME = "UI.SEARCH";
|
|
1192
1204
|
const RESET_BTN_NAME = "UI.RESET";
|
|
1193
1205
|
const SEARCH_BTNS = [
|
|
1194
|
-
{
|
|
1195
|
-
{
|
|
1206
|
+
{ label: SEARCH_BTN_NAME, preIcon: "mdi:magnify", type: "primary" },
|
|
1207
|
+
{ label: RESET_BTN_NAME, preIcon: "mdi:refresh", type: "default" }
|
|
1196
1208
|
];
|
|
1197
1209
|
function useFormEvents({
|
|
1198
1210
|
emits,
|
|
@@ -1478,22 +1490,29 @@ function useFormActions(opt) {
|
|
|
1478
1490
|
const { getProps, defaultValue, updateSchema, getFormValues, setFormValues } = opt;
|
|
1479
1491
|
const { appConf } = useAppStore();
|
|
1480
1492
|
function handleAdvanced(isAdvanced) {
|
|
1481
|
-
const {
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1493
|
+
const {
|
|
1494
|
+
schemas,
|
|
1495
|
+
minShowColumn = appConf.ui.form?.minShowColumn || 2,
|
|
1496
|
+
showAdvancedButton = true
|
|
1497
|
+
} = unref(getProps);
|
|
1498
|
+
let schema = [...schemas];
|
|
1499
|
+
if (showAdvancedButton) {
|
|
1500
|
+
schema = schemas.reduce((t, it, index) => {
|
|
1501
|
+
if (index > minShowColumn - 1)
|
|
1502
|
+
it.isAdvanced = isAdvanced;
|
|
1503
|
+
t.push(it);
|
|
1504
|
+
return t;
|
|
1505
|
+
}, []);
|
|
1506
|
+
}
|
|
1488
1507
|
updateSchema(schema);
|
|
1489
1508
|
}
|
|
1490
1509
|
function handleMethod(params) {
|
|
1491
1510
|
const { onSearch, onReset } = unref(getProps);
|
|
1492
1511
|
if (isBoolean(params)) {
|
|
1493
1512
|
handleAdvanced(params);
|
|
1494
|
-
} else if (params.
|
|
1513
|
+
} else if (params.label === SEARCH_BTN_NAME) {
|
|
1495
1514
|
onSearch(getFormValues());
|
|
1496
|
-
} else if (params.
|
|
1515
|
+
} else if (params.label === RESET_BTN_NAME) {
|
|
1497
1516
|
setFormValues(toRaw(defaultValue.value));
|
|
1498
1517
|
onReset(getFormValues());
|
|
1499
1518
|
} else {
|
|
@@ -1567,10 +1586,6 @@ const BasicProps = {
|
|
|
1567
1586
|
type: Boolean,
|
|
1568
1587
|
default: true
|
|
1569
1588
|
},
|
|
1570
|
-
alwaysShowLines: {
|
|
1571
|
-
type: Boolean,
|
|
1572
|
-
default: false
|
|
1573
|
-
},
|
|
1574
1589
|
minShowColumn: {
|
|
1575
1590
|
type: Number,
|
|
1576
1591
|
default: 2
|
|
@@ -1808,7 +1823,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
1808
1823
|
} }), {
|
|
1809
1824
|
default: withCtx(() => [
|
|
1810
1825
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(getSchema), (schema) => {
|
|
1811
|
-
return openBlock(), createBlock(unref(
|
|
1826
|
+
return openBlock(), createBlock(unref(_sfc_main$b), {
|
|
1812
1827
|
key: schema.name,
|
|
1813
1828
|
schema,
|
|
1814
1829
|
formProps: unref(getProps),
|
|
@@ -1827,7 +1842,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
1827
1842
|
})
|
|
1828
1843
|
]), 1032, ["schema", "formProps", "formModel", "defaultValues"]);
|
|
1829
1844
|
}), 128)),
|
|
1830
|
-
unref(getActionsProps).buttonList?.length ? (openBlock(), createBlock(unref(
|
|
1845
|
+
unref(getActionsProps).buttonList?.length ? (openBlock(), createBlock(unref(_sfc_main$a), mergeProps({ key: 0 }, unref(getActionsProps), { onHandleMethod: unref(handleMethod) }), null, 16, ["onHandleMethod"])) : createCommentVNode("", true)
|
|
1831
1846
|
]),
|
|
1832
1847
|
_: 3
|
|
1833
1848
|
}, 16)
|
|
@@ -1837,7 +1852,6 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
1837
1852
|
};
|
|
1838
1853
|
}
|
|
1839
1854
|
});
|
|
1840
|
-
const Forms = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/form/src/index.vue"]]);
|
|
1841
1855
|
function useForm(props) {
|
|
1842
1856
|
const formRef = ref(null);
|
|
1843
1857
|
const loadedRef = ref(false);
|
|
@@ -1914,7 +1928,7 @@ const withInstall = (comp) => {
|
|
|
1914
1928
|
};
|
|
1915
1929
|
return comp;
|
|
1916
1930
|
};
|
|
1917
|
-
const DtForm = withInstall(
|
|
1931
|
+
const DtForm = withInstall(_sfc_main$9);
|
|
1918
1932
|
const orgDialogProp = reactive({});
|
|
1919
1933
|
const cbTransfer = reactive({});
|
|
1920
1934
|
const dataTransfer = reactive({});
|
|
@@ -2219,13 +2233,12 @@ const _sfc_main$8 = {
|
|
|
2219
2233
|
};
|
|
2220
2234
|
if (!propsData?.visible)
|
|
2221
2235
|
return null;
|
|
2222
|
-
return createVNode(Modal
|
|
2236
|
+
return createVNode(Modal, propsData, _isSlot(_slot = extendSlots(slots)) ? _slot : {
|
|
2223
2237
|
default: () => [_slot]
|
|
2224
2238
|
});
|
|
2225
2239
|
};
|
|
2226
2240
|
}
|
|
2227
2241
|
};
|
|
2228
|
-
const Modal = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/modal/src/components/Modal.vue"]]);
|
|
2229
2242
|
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
2230
2243
|
__name: "CloseIcon",
|
|
2231
2244
|
props: {
|
|
@@ -2284,7 +2297,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
2284
2297
|
]),
|
|
2285
2298
|
_: 1
|
|
2286
2299
|
}, 8, ["title"]))
|
|
2287
|
-
], 64)) : createCommentVNode("
|
|
2300
|
+
], 64)) : createCommentVNode("", true),
|
|
2288
2301
|
createElementVNode("i", {
|
|
2289
2302
|
class: "i mdi:close h-14 w-10 pr-4",
|
|
2290
2303
|
onClick: handleCancel
|
|
@@ -2293,7 +2306,6 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
2293
2306
|
};
|
|
2294
2307
|
}
|
|
2295
2308
|
});
|
|
2296
|
-
const CloseIcon = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/modal/src/components/CloseIcon.vue"]]);
|
|
2297
2309
|
const isServer = typeof window === "undefined";
|
|
2298
2310
|
const BAR_MAP = {
|
|
2299
2311
|
vertical: {
|
|
@@ -2535,13 +2547,12 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
2535
2547
|
};
|
|
2536
2548
|
}
|
|
2537
2549
|
});
|
|
2538
|
-
const ScrollBar = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/container/src/components/scroll-bar.vue"]]);
|
|
2539
2550
|
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
2540
2551
|
__name: "scroll-container",
|
|
2541
2552
|
setup(__props) {
|
|
2542
2553
|
const scrollbarRef = ref(null);
|
|
2543
2554
|
return (_ctx, _cache) => {
|
|
2544
|
-
return openBlock(), createBlock(
|
|
2555
|
+
return openBlock(), createBlock(_sfc_main$6, mergeProps({
|
|
2545
2556
|
ref_key: "scrollbarRef",
|
|
2546
2557
|
ref: scrollbarRef
|
|
2547
2558
|
}, _ctx.$attrs, { class: "w-full h-full" }), {
|
|
@@ -2553,7 +2564,6 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
2553
2564
|
};
|
|
2554
2565
|
}
|
|
2555
2566
|
});
|
|
2556
|
-
const ScrollContainer = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/container/src/scroll-container.vue"]]);
|
|
2557
2567
|
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
2558
2568
|
__name: "slot-container",
|
|
2559
2569
|
props: {
|
|
@@ -2572,9 +2582,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
2572
2582
|
};
|
|
2573
2583
|
}
|
|
2574
2584
|
});
|
|
2575
|
-
const
|
|
2576
|
-
|
|
2577
|
-
withInstall(SlotContainer);
|
|
2585
|
+
const DtScrollContainer = withInstall(_sfc_main$5);
|
|
2586
|
+
withInstall(_sfc_main$4);
|
|
2578
2587
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
2579
2588
|
__name: "ModalWrap",
|
|
2580
2589
|
props: {
|
|
@@ -2681,7 +2690,6 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2681
2690
|
};
|
|
2682
2691
|
}
|
|
2683
2692
|
});
|
|
2684
|
-
const ModalWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/modal/src/components/ModalWrap.vue"]]);
|
|
2685
2693
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
2686
2694
|
__name: "ModalFooter",
|
|
2687
2695
|
props: {
|
|
@@ -2702,8 +2710,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
2702
2710
|
if (props.buttons && props.buttons.length)
|
|
2703
2711
|
return props.buttons;
|
|
2704
2712
|
let buttonActions = [
|
|
2705
|
-
{ t: "\u4FDD\u5B58",
|
|
2706
|
-
{ t: "\u5173\u95ED",
|
|
2713
|
+
{ t: "\u4FDD\u5B58", label: props.okText || t("SAVE"), preIcon: "mdi:content-save", type: "primary", flag: "OK" },
|
|
2714
|
+
{ t: "\u5173\u95ED", label: props.cancelText || t("CLOSE"), preIcon: "mdi:close", flag: "CANCEL" }
|
|
2707
2715
|
];
|
|
2708
2716
|
if (!props.showSave)
|
|
2709
2717
|
buttonActions = buttonActions.filter((btn) => btn.flag !== "OK");
|
|
@@ -2724,7 +2732,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
2724
2732
|
return (_ctx, _cache) => {
|
|
2725
2733
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
2726
2734
|
renderSlot(_ctx.$slots, "appendFooter"),
|
|
2727
|
-
createVNode(
|
|
2735
|
+
createVNode(_sfc_main$a, {
|
|
2728
2736
|
mode: "dialog",
|
|
2729
2737
|
buttonList: unref(buttonList),
|
|
2730
2738
|
onHandleMethod: _cache[0] || (_cache[0] = ($event) => handleMethod($event))
|
|
@@ -2733,7 +2741,6 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
2733
2741
|
};
|
|
2734
2742
|
}
|
|
2735
2743
|
});
|
|
2736
|
-
const ModalFooter = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/modal/src/components/ModalFooter.vue"]]);
|
|
2737
2744
|
function useFullScreen(wrapClassName) {
|
|
2738
2745
|
const fullScreenRef = ref(false);
|
|
2739
2746
|
const getWrapClassName = computed(() => {
|
|
@@ -2852,14 +2859,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
2852
2859
|
});
|
|
2853
2860
|
return (_ctx, _cache) => {
|
|
2854
2861
|
const _component_ASpin = Spin;
|
|
2855
|
-
return openBlock(), createBlock(
|
|
2862
|
+
return openBlock(), createBlock(_sfc_main$8, mergeProps(unref(getBindValue), { onCancel: handleCancel }), createSlots({
|
|
2856
2863
|
default: withCtx(() => [
|
|
2857
2864
|
createVNode(_component_ASpin, {
|
|
2858
2865
|
spinning: unref(getBindValue).loading,
|
|
2859
2866
|
tip: unref(getBindValue).loadingTip
|
|
2860
2867
|
}, {
|
|
2861
2868
|
default: withCtx(() => [
|
|
2862
|
-
createVNode(
|
|
2869
|
+
createVNode(_sfc_main$3, mergeProps({
|
|
2863
2870
|
useWrapper: unref(getBindValue).useWrapper,
|
|
2864
2871
|
fullScreen: unref(fullScreenRef),
|
|
2865
2872
|
ref_key: "modalWrapperRef",
|
|
@@ -2883,7 +2890,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
2883
2890
|
!_ctx.$slots.closeIcon ? {
|
|
2884
2891
|
name: "closeIcon",
|
|
2885
2892
|
fn: withCtx(() => [
|
|
2886
|
-
createVNode(
|
|
2893
|
+
createVNode(_sfc_main$7, {
|
|
2887
2894
|
canFullscreen: unref(getBindValue).canFullscreen,
|
|
2888
2895
|
fullScreen: unref(fullScreenRef),
|
|
2889
2896
|
onCancel: handleCancel,
|
|
@@ -2902,7 +2909,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
2902
2909
|
!_ctx.$slots.footer ? {
|
|
2903
2910
|
name: "footer",
|
|
2904
2911
|
fn: withCtx(() => [
|
|
2905
|
-
createVNode(
|
|
2912
|
+
createVNode(_sfc_main$2, {
|
|
2906
2913
|
buttons: propsRef.value?.footer,
|
|
2907
2914
|
showSave: unref(getBindValue).showOkBtn,
|
|
2908
2915
|
showCancel: unref(getBindValue).showCancelBtn,
|
|
@@ -2935,7 +2942,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
2935
2942
|
};
|
|
2936
2943
|
}
|
|
2937
2944
|
});
|
|
2938
|
-
const DtModal$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/modal/src/index.vue"]]);
|
|
2939
2945
|
const basicProps = {
|
|
2940
2946
|
title: {
|
|
2941
2947
|
type: Object
|
|
@@ -3007,7 +3013,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3007
3013
|
props?.onSave();
|
|
3008
3014
|
}
|
|
3009
3015
|
return (_ctx, _cache) => {
|
|
3010
|
-
return openBlock(), createBlock(unref(
|
|
3016
|
+
return openBlock(), createBlock(unref(_sfc_main$1), {
|
|
3011
3017
|
onRegister: unref(registerDialog),
|
|
3012
3018
|
onSave: _cache[0] || (_cache[0] = ($event) => handleSave())
|
|
3013
3019
|
}, {
|
|
@@ -3019,7 +3025,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3019
3025
|
};
|
|
3020
3026
|
}
|
|
3021
3027
|
});
|
|
3022
|
-
const DtModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/curd/src/components/Curd.vue"]]);
|
|
3023
3028
|
function useCurd(curdOpt) {
|
|
3024
3029
|
const [register, {
|
|
3025
3030
|
openModal,
|
|
@@ -3047,7 +3052,7 @@ function useCurd(curdOpt) {
|
|
|
3047
3052
|
const DtCurdModal = () => {
|
|
3048
3053
|
return h(createVNode("div", {
|
|
3049
3054
|
"class": "dt-curd-modal"
|
|
3050
|
-
}, [createVNode(
|
|
3055
|
+
}, [createVNode(_sfc_main, mergeProps(curdOpt, {
|
|
3051
3056
|
"title": title,
|
|
3052
3057
|
"onRegister": register
|
|
3053
3058
|
}), {
|
|
@@ -100,10 +100,6 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
100
100
|
type: BooleanConstructor;
|
|
101
101
|
default: boolean;
|
|
102
102
|
};
|
|
103
|
-
alwaysShowLines: {
|
|
104
|
-
type: BooleanConstructor;
|
|
105
|
-
default: boolean;
|
|
106
|
-
};
|
|
107
103
|
minShowColumn: {
|
|
108
104
|
type: NumberConstructor;
|
|
109
105
|
default: number;
|
|
@@ -1152,10 +1148,6 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
1152
1148
|
type: BooleanConstructor;
|
|
1153
1149
|
default: boolean;
|
|
1154
1150
|
};
|
|
1155
|
-
alwaysShowLines: {
|
|
1156
|
-
type: BooleanConstructor;
|
|
1157
|
-
default: boolean;
|
|
1158
|
-
};
|
|
1159
1151
|
minShowColumn: {
|
|
1160
1152
|
type: NumberConstructor;
|
|
1161
1153
|
default: number;
|