@dt-frames/ui 2.0.10 → 2.0.12

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.
Files changed (64) hide show
  1. package/es/components/container/index.d.ts +2 -93
  2. package/es/components/curd/index.js +7 -2966
  3. package/es/components/curd/src/components/Curd.d.ts +19 -891
  4. package/es/components/curd/src/hooks/useCurd.d.ts +2 -2
  5. package/es/components/curd/src/props.d.ts +6 -4
  6. package/es/components/curd/src/types/curd.type.d.ts +2 -2
  7. package/es/components/drawer/index.d.ts +10 -167
  8. package/es/components/drawer/index.js +24 -462
  9. package/es/components/drawer/src/components/DrawerFooter.d.ts +1 -84
  10. package/es/components/drawer/src/index.d.ts +10 -167
  11. package/es/components/drawer/src/types/index.type.d.ts +2 -2
  12. package/es/components/form/index.d.ts +5 -1
  13. package/es/components/form/index.js +81 -485
  14. package/es/components/form/src/components/FormItem.d.ts +3 -1
  15. package/es/components/form/src/components/formIcon.d.ts +3 -11
  16. package/es/components/form/src/components/formInputUseDialog.d.ts +2 -2
  17. package/es/components/form/src/props.d.ts +7 -5
  18. package/es/components/form/src/types/form.type.d.ts +3 -0
  19. package/es/components/form/src/types/items.type.d.ts +6 -4
  20. package/es/components/icons/index.d.ts +497 -497
  21. package/es/components/iframe/index.d.ts +2 -0
  22. package/es/components/iframe/index.js +72 -0
  23. package/es/components/iframe/index.less +29 -0
  24. package/es/components/iframe/src/index.d.ts +38 -0
  25. package/es/components/modal/index.d.ts +2 -1
  26. package/es/components/modal/index.js +23 -475
  27. package/es/components/modal/src/components/Modal.d.ts +1 -1
  28. package/es/components/modal/src/components/ModalFooter.d.ts +2 -95
  29. package/es/components/modal/src/components/ModalWrap.d.ts +1 -75
  30. package/es/components/modal/src/index.d.ts +14 -179
  31. package/es/components/table/index.js +328 -2030
  32. package/es/components/table/src/components/TableAction.d.ts +1 -1
  33. package/es/components/table/src/components/editTable/EditTableCell.d.ts +1 -1
  34. package/es/components/table/src/components/tableSetting/DownloadCtrl.d.ts +1 -877
  35. package/es/components/table/src/index.d.ts +10 -10
  36. package/es/components/tree/src/components/TreeHeader.d.ts +1 -1
  37. package/es/components/tree/src/index.d.ts +2 -2
  38. package/es/components/upload/index.d.ts +2 -0
  39. package/es/components/upload/index.js +419 -0
  40. package/es/components/upload/index.less +37 -0
  41. package/es/components/upload/src/basicProps.d.ts +89 -0
  42. package/es/components/upload/src/components/PdfView.d.ts +9 -0
  43. package/es/components/upload/src/hooks/useFile.d.ts +15 -0
  44. package/es/components/upload/src/index.d.ts +236 -0
  45. package/es/components/upload/src/type/file.d.ts +10 -0
  46. package/es/components/upload/src/utils/upload.d.ts +2 -0
  47. package/es/theme/index.d.ts +2 -1
  48. package/es/theme/index.js +98 -145
  49. package/es/theme/index.less +5 -1
  50. package/es/theme/src/components/content/index.d.ts +2 -0
  51. package/es/theme/src/components/header/index.d.ts +809 -809
  52. package/es/theme/src/components/header/multiple-header.d.ts +918 -918
  53. package/es/theme/src/hooks/useMenu.d.ts +1 -1
  54. package/es/theme/src/index.d.ts +2059 -2057
  55. package/index.d.ts +3 -1
  56. package/index.js +24 -2
  57. package/manualContentPath.js +124 -0
  58. package/package.json +8 -3
  59. package/vite.config.ts +19 -4
  60. package/es/components/curd/index.less +0 -2
  61. package/es/components/form/src/index.d.ts +0 -2922
  62. package/es/components/table/src/components/TableHeader.d.ts +0 -1136
  63. package/es/components/table/src/components/tableSetting/Download.d.ts +0 -922
  64. package/es/components/table/src/components/tableSetting/index.d.ts +0 -1030
@@ -1,11 +1,11 @@
1
1
  import { RadioButton, RadioGroup, Button, FormItem as FormItem$1, Col as Col$1, Row, Form as Form$1 } from "ant-design-vue/es";
2
2
  import "ant-design-vue/es/form/style";
3
3
  import "ant-design-vue/es/row/style";
4
- import { toRaw, unref, computed, getCurrentInstance, reactive, readonly, watchEffect, nextTick, defineComponent, useAttrs, openBlock, createBlock, mergeProps, isRef, withCtx, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, toRefs, createVNode, isVNode, ref, watch, resolveDirective, normalizeProps, normalizeStyle, withDirectives, normalizeClass, createCommentVNode, createElementVNode, onMounted, withKeys, createSlots, renderSlot, guardReactiveProps } from "vue";
5
- import { DtCache, CacheKey, deepMerge, Pages, useGo, useRedo, Language, useAppStore, isNumber, useI18n, isString, useSlots, isArray, isFunction, error, isBoolean, isNull, dispatchResize, isObject, isNullAndUnDef, isEmpty, useTimeoutFn } from "@dt-frames/core";
6
- import { cloneDeep, merge, isEqual, upperFirst, uniqBy, set } from "lodash-es";
4
+ import { computed, unref, getCurrentInstance, reactive, readonly, watchEffect, nextTick, toRaw, defineComponent, useAttrs, openBlock, createBlock, mergeProps, isRef, withCtx, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, createElementVNode, createVNode, normalizeProps, guardReactiveProps, createCommentVNode, toRefs, isVNode, ref, watch, resolveDirective, normalizeStyle, withDirectives, normalizeClass, onMounted, withKeys, createSlots, renderSlot } from "vue";
5
+ import { useAppStore, isNumber, useI18n, isString, isFunction, error, useSlots, isArray, isUnDef, isBoolean, isNull, dispatchResize, isObject, deepMerge, isNullAndUnDef, useTimeoutFn } from "@dt-frames/core";
6
+ import { merge, isEqual, omit, cloneDeep, upperFirst, uniqBy, set } from "lodash-es";
7
7
  import { Input, Select, TreeSelect, Radio, Checkbox, AutoComplete, Cascader, DatePicker, InputNumber, Switch, TimePicker, Slider, Rate, Divider, Col, Tooltip, Form, FormItem } from "ant-design-vue";
8
- import { defineStore } from "pinia";
8
+ import { useHeader, UiSize } from "../../theme";
9
9
  import "ant-design-vue/es/radio/style";
10
10
  import "ant-design-vue/es/cascader/style";
11
11
  import "ant-design-vue/es/input-number/style";
@@ -17,471 +17,6 @@ import "ant-design-vue/es/date-picker/style";
17
17
  import "ant-design-vue/es/col/style";
18
18
  import "ant-design-vue/es/button/style";
19
19
  import dayjs from "dayjs";
20
- var Theme = /* @__PURE__ */ ((Theme2) => {
21
- Theme2["DARK"] = "dark";
22
- Theme2["LIGHT"] = "light";
23
- return Theme2;
24
- })(Theme || {});
25
- var MenuType = /* @__PURE__ */ ((MenuType2) => {
26
- MenuType2["SIDE"] = "sidebar";
27
- MenuType2["TOP_MENU"] = "top-menu";
28
- MenuType2["MIX"] = "mix";
29
- MenuType2["MIX_SIDEBAR"] = "mix-sidebar";
30
- return MenuType2;
31
- })(MenuType || {});
32
- var MenuMode = /* @__PURE__ */ ((MenuMode2) => {
33
- MenuMode2["INLINE"] = "inline";
34
- MenuMode2["HORIZONTAL"] = "horizontal";
35
- MenuMode2["VERTICAL"] = "vertical";
36
- return MenuMode2;
37
- })(MenuMode || {});
38
- var ContentMode = /* @__PURE__ */ ((ContentMode2) => {
39
- ContentMode2["FULL"] = "full";
40
- ContentMode2["FIXED"] = "fixed";
41
- return ContentMode2;
42
- })(ContentMode || {});
43
- var UiSize = /* @__PURE__ */ ((UiSize2) => {
44
- UiSize2["LARGE"] = "large";
45
- UiSize2["MIDDLE"] = "middle";
46
- UiSize2["SMALL"] = "small";
47
- return UiSize2;
48
- })(UiSize || {});
49
- const defaultThemeConf = {
50
- content: {
51
- contentMode: ContentMode.FULL
52
- },
53
- headOptions: {
54
- fixed: true,
55
- theme: Theme.LIGHT,
56
- showLogo: true,
57
- showBackToTop: true,
58
- useLockPage: true,
59
- size: UiSize.SMALL,
60
- showSize: true,
61
- showBreadCrumb: true,
62
- showFullScreen: true,
63
- showSearch: true,
64
- showNotice: true,
65
- showLocaleSwitch: true,
66
- showSettingTheme: true,
67
- showLoginOut: true
68
- },
69
- menuOptions: {
70
- fixed: true,
71
- theme: Theme.DARK,
72
- collapsed: false,
73
- collapsedShowTitle: false,
74
- canDrag: true,
75
- show: true,
76
- hidden: false,
77
- split: false,
78
- menuWidth: 240,
79
- trigger: true,
80
- type: MenuType.SIDE,
81
- mode: MenuMode.INLINE,
82
- mixSideTrigger: "hover"
83
- },
84
- footerOptions: {
85
- show: false,
86
- height: 48,
87
- title: "Copyright(C) 2021 by www.ithinkdt.com. All rights reserved.",
88
- subTitle: "Privacy Statement"
89
- },
90
- routeReuse: {
91
- show: true,
92
- cache: false,
93
- canDrag: true,
94
- showQuick: true,
95
- showRedo: true,
96
- showFold: true
97
- }
98
- };
99
- const useThemeStore = defineStore({
100
- id: "dt-theme",
101
- state: () => ({
102
- themeConf: DtCache.getLocal(CacheKey.THEME) ?? cloneDeep(defaultThemeConf),
103
- pageLoading: false,
104
- mixSiderHasSubMenu: false
105
- }),
106
- getters: {
107
- getThemeConf() {
108
- return this.themeConf;
109
- },
110
- getHeaderConf() {
111
- return this.themeConf.headOptions;
112
- },
113
- getMenuConf() {
114
- return this.themeConf.menuOptions;
115
- },
116
- getFooterConf() {
117
- return this.themeConf.footerOptions;
118
- },
119
- getRouteReuseConf() {
120
- return this.themeConf.routeReuse;
121
- },
122
- getPageLoading() {
123
- return this.pageLoading;
124
- },
125
- getMixSiderIsHasMenu() {
126
- return this.mixSiderHasSubMenu;
127
- }
128
- },
129
- actions: {
130
- setThemeConf(options = {}) {
131
- let newThemeConf = deepMerge(this.themeConf, options);
132
- this.themeConf = deepMerge(defaultThemeConf, newThemeConf);
133
- DtCache.setLocal(CacheKey.THEME, this.themeConf);
134
- },
135
- setMixSiderIsHasMenu(val) {
136
- this.mixSiderHasSubMenu = val;
137
- },
138
- resetState() {
139
- DtCache.removeLocal(CacheKey.THEME);
140
- this.themeConf = cloneDeep(defaultThemeConf);
141
- }
142
- }
143
- });
144
- function handleGotoPage(router) {
145
- const go = useGo(router);
146
- go(unref(router.currentRoute).path, true);
147
- }
148
- defineStore({
149
- id: "route-reuse",
150
- state: () => ({
151
- cacheTabList: /* @__PURE__ */ new Set(),
152
- tabList: DtCache.getLocal(CacheKey.ROUTE_REUSE) || [],
153
- lastDragEndIndex: 0
154
- }),
155
- getters: {
156
- getTabList() {
157
- return this.tabList;
158
- },
159
- getCachedTabList() {
160
- return Array.from(this.cacheTabList);
161
- },
162
- getLastDragEndIndex() {
163
- return this.lastDragEndIndex;
164
- }
165
- },
166
- actions: {
167
- async addTab(route) {
168
- const { path, name, fullPath, params, query, meta } = route;
169
- if (path === Pages.NOT_FOUND || path === Pages.LOGIN || path === Pages.BASE_PAGE) {
170
- return;
171
- }
172
- let updateIndex = -1;
173
- const tabHasExits = this.tabList.some((tab, index) => {
174
- updateIndex = index;
175
- return (tab.fullPath || tab.path) === (fullPath || path);
176
- });
177
- if (tabHasExits) {
178
- const curTab = toRaw(this.tabList)[updateIndex];
179
- curTab.params = params || curTab.params;
180
- curTab.query = query || curTab.query;
181
- curTab.fullPath = fullPath || curTab.fullPath;
182
- this.tabList.splice(updateIndex, 1, curTab);
183
- } else {
184
- this.tabList.push(JSON.parse(JSON.stringify(route)));
185
- }
186
- this.updateCacheTab();
187
- },
188
- closeTab(route, router) {
189
- const go = useGo(router);
190
- const index = this.tabList.findIndex((item) => item.path === route.path);
191
- let page;
192
- if (index === 0) {
193
- if (this.tabList.length !== 1) {
194
- page = this.tabList[index + 1];
195
- }
196
- } else {
197
- page = this.tabList[index - 1];
198
- }
199
- this.bulkCloseTabs([route.path]);
200
- this.updateCacheTab();
201
- route.path === router.currentRoute.value.path && go(page.path);
202
- },
203
- closeAllTab(currentRoute, router) {
204
- const go = useGo(router);
205
- let filterTabList = this.tabList.filter((item) => item?.meta?.affix ?? false);
206
- const route = filterTabList.length > 0 ? filterTabList[filterTabList.length - 1] : unref(currentRoute);
207
- this.tabList = [route];
208
- this.updateCacheTab();
209
- go(route.path);
210
- },
211
- closeLeftTabs(route, router) {
212
- const index = this.tabList.findIndex((item) => item.path === route.path);
213
- if (index > 0) {
214
- const leftTabs = this.tabList.slice(0, index);
215
- const pathList = [];
216
- for (const item of leftTabs) {
217
- const affix = item?.meta?.affix ?? false;
218
- if (!affix) {
219
- pathList.push(item.fullPath);
220
- }
221
- }
222
- this.bulkCloseTabs(pathList);
223
- }
224
- this.updateCacheTab();
225
- handleGotoPage(router);
226
- },
227
- closeRightTabs(route, router) {
228
- const index = this.tabList.findIndex((item) => item.path === route.path);
229
- if (index >= 0 && index < this.tabList.length - 1) {
230
- const rightTabs = this.tabList.slice(index + 1, this.tabList.length);
231
- const pathList = [];
232
- for (const item of rightTabs) {
233
- const affix = item?.meta?.affix ?? false;
234
- if (!affix) {
235
- pathList.push(item.fullPath);
236
- }
237
- }
238
- this.bulkCloseTabs(pathList);
239
- }
240
- this.updateCacheTab();
241
- handleGotoPage(router);
242
- },
243
- closeOtherTabs(route, router) {
244
- const pathList = [];
245
- for (let item of this.tabList) {
246
- const affix = item?.meta?.affix ?? false;
247
- if (item.path !== route.path && !affix) {
248
- pathList.push(item.path);
249
- }
250
- }
251
- this.bulkCloseTabs(pathList);
252
- this.updateCacheTab();
253
- handleGotoPage(router);
254
- },
255
- closeTabByKey(path, router) {
256
- const go = useGo(router);
257
- const index = this.tabList.findIndex((item) => item.path === path);
258
- let page;
259
- if (index === 0) {
260
- if (this.tabList.length !== 1) {
261
- page = this.tabList[index + 1];
262
- }
263
- } else {
264
- page = this.tabList[index - 1];
265
- }
266
- this.bulkCloseTabs([path]);
267
- this.updateCacheTab();
268
- path === router.currentRoute.value.path && go(page.path);
269
- },
270
- bulkCloseTabs(pathList) {
271
- this.tabList = this.tabList.filter((item) => !pathList.includes(item.fullPath));
272
- },
273
- updateCacheTab() {
274
- DtCache.setLocal(CacheKey.ROUTE_REUSE, this.tabList);
275
- const cacheMap = /* @__PURE__ */ new Set();
276
- for (const tab of this.tabList) {
277
- if (tab.meta?.hideTab) {
278
- continue;
279
- }
280
- const name = tab.name;
281
- cacheMap.add(name);
282
- }
283
- this.cacheTabList = cacheMap;
284
- },
285
- async refreshPage(router) {
286
- const findTab = this.getCachedTabList.find((item) => item === unref(router.currentRoute).name);
287
- if (findTab) {
288
- this.cacheTabList.delete(findTab.toString());
289
- }
290
- const redo = useRedo(router);
291
- await redo();
292
- },
293
- sortTabs(oldIndex, newIndex) {
294
- const currentTab = this.tabList[oldIndex];
295
- this.tabList.splice(oldIndex, 1);
296
- this.tabList.splice(newIndex, 0, currentTab);
297
- this.lastDragEndIndex = this.lastDragEndIndex + 1;
298
- },
299
- resetState() {
300
- this.tabList = [];
301
- this.updateCacheTab();
302
- }
303
- }
304
- });
305
- function useMenu() {
306
- const { setThemeConf } = useThemeStore();
307
- const getCollapsedShowTitle = computed(() => useThemeStore().getMenuConf.collapsedShowTitle);
308
- const getIsSidebarType = computed(() => useThemeStore().getMenuConf.type === MenuType.SIDE);
309
- const getMenuFixed = computed(() => useThemeStore().getMenuConf.fixed);
310
- const getShowMenu = computed(() => useThemeStore().getMenuConf.show);
311
- const getShowSidebar = computed(() => {
312
- return unref(getSplit) || unref(getShowMenu) && unref(getMenuMode) !== MenuMode.HORIZONTAL;
313
- });
314
- const getMenuHidden = computed(() => useThemeStore().getMenuConf.hidden);
315
- const getMenuTheme = computed(() => useThemeStore().getMenuConf.theme);
316
- const getTrigger = computed(() => useThemeStore().getMenuConf.trigger);
317
- const getCanDrag = computed(() => useThemeStore().getMenuConf.canDrag);
318
- const getIsMixMode = computed(() => {
319
- return unref(getMenuMode) === MenuMode.INLINE && unref(getMenuType) === MenuType.MIX;
320
- });
321
- const getIsMixSidebar = computed(() => unref(getMenuType) === MenuType.MIX_SIDEBAR);
322
- const getMenuWidth = computed(() => {
323
- if (unref(getIsMixMode)) {
324
- return Number(useThemeStore().getMenuConf.menuWidth) - 40;
325
- } else if (unref(getIsMixSidebar)) {
326
- return Number(useThemeStore().getMenuConf.menuWidth) - 10;
327
- } else {
328
- return Number(useThemeStore().getMenuConf.menuWidth);
329
- }
330
- });
331
- const getMixSideTrigger = computed(() => useThemeStore().getMenuConf.mixSideTrigger);
332
- const getLogoWidth = computed(() => unref(getIsMixSidebar) ? "80px" : useThemeStore().getMenuConf.menuWidth);
333
- const getMenuType = computed(() => useThemeStore().getMenuConf.type);
334
- const getIsTopMenu = computed(() => unref(getMenuType) === MenuType.TOP_MENU);
335
- const getMenuMode = computed(() => useThemeStore().getMenuConf.mode);
336
- const getSplit = computed(() => useThemeStore().getMenuConf.split);
337
- const getCollapsed = computed(() => useThemeStore().getMenuConf.collapsed);
338
- const getIsHorizontal = computed(() => unref(getMenuMode) === MenuMode.HORIZONTAL);
339
- const setThemeStore = (conf = {}) => setThemeConf(conf);
340
- const toggleCollapsed = () => setThemeStore({
341
- menuOptions: {
342
- collapsed: !unref(getCollapsed)
343
- }
344
- });
345
- const getMiniWidthNumber = computed(() => useThemeStore().getMenuConf.collapsedShowTitle ? 80 : 48);
346
- const getRealWidth = computed(() => {
347
- return unref(getCollapsed) ? unref(getMiniWidthNumber) : unref(getMenuWidth);
348
- });
349
- const getCalcContentWidth = computed(() => {
350
- const width = unref(getIsTopMenu) || !unref(getShowMenu) || unref(getSplit) && unref(getMenuHidden) ? 0 : unref(getRealWidth);
351
- return `calc(100% - ${unref(width)}px)`;
352
- });
353
- return {
354
- getCollapsedShowTitle,
355
- getIsSidebarType,
356
- getMenuFixed,
357
- getShowMenu,
358
- getShowSidebar,
359
- getMenuHidden,
360
- getMenuTheme,
361
- getTrigger,
362
- getMenuWidth,
363
- getLogoWidth,
364
- getMenuType,
365
- getIsTopMenu,
366
- getMenuMode,
367
- getSplit,
368
- getCollapsed,
369
- getIsHorizontal,
370
- getMiniWidthNumber,
371
- getRealWidth,
372
- getCalcContentWidth,
373
- getIsMixMode,
374
- getIsMixSidebar,
375
- getCanDrag,
376
- getMixSideTrigger,
377
- toggleCollapsed,
378
- setThemeStore
379
- };
380
- }
381
- function useMultipleTab() {
382
- const { getRouteReuseConf } = useThemeStore();
383
- const getShowMultipleTab = computed(() => getRouteReuseConf.show);
384
- const getShowQuick = computed(() => getRouteReuseConf.showQuick);
385
- const getMultipleTabPosIsTop = computed(() => getRouteReuseConf.position === "top");
386
- const getShowRedo = computed(() => getRouteReuseConf.showRedo);
387
- const getCanCache = computed(() => getRouteReuseConf.cache);
388
- const getCanDrag = computed(() => getRouteReuseConf.canDrag);
389
- return {
390
- getShowMultipleTab,
391
- getShowQuick,
392
- getMultipleTabPosIsTop,
393
- getShowRedo,
394
- getCanCache,
395
- getCanDrag
396
- };
397
- }
398
- function useHeader() {
399
- const HEADER_HEIGHT = 48;
400
- const TABS_HEIGHT = 33;
401
- const { getHeaderConf = {} } = useThemeStore();
402
- const {
403
- getIsSidebarType,
404
- getMenuType,
405
- getShowMenu,
406
- getMenuHidden,
407
- getTrigger,
408
- getMenuMode,
409
- getSplit,
410
- getIsTopMenu,
411
- getIsMixSidebar
412
- } = useMenu();
413
- const { getShowMultipleTab, getMultipleTabPosIsTop } = useMultipleTab();
414
- const getHeaderTheme = computed(() => getHeaderConf.theme);
415
- const getFixed = computed(() => getHeaderConf.fixed);
416
- const getShowHeaderLogo = computed(() => unref(getShowLogo) && !unref(getIsSidebarType) && !unref(getIsMixSidebar));
417
- const getShowSearch = computed(() => getHeaderConf.showSearch);
418
- const getShowHeaderTrigger = computed(() => {
419
- if (unref(getMenuType) === MenuType.TOP_MENU || !unref(getShowMenu) || unref(getMenuHidden)) {
420
- return false;
421
- }
422
- return unref(getTrigger);
423
- });
424
- const getShowBreadCrumb = computed(() => getHeaderConf.showBreadCrumb);
425
- const getShowBread = computed(
426
- () => unref(getMenuMode) !== MenuMode.HORIZONTAL && !unref(getSplit) && unref(getShowBreadCrumb)
427
- );
428
- const getShowTopMenu = computed(() => unref(getMenuMode) === MenuMode.HORIZONTAL || unref(getSplit));
429
- const getShowNotice = computed(() => getHeaderConf.showNotice);
430
- const getShowFullScreen = computed(() => getHeaderConf.showFullScreen);
431
- const getShowLocale = computed(() => getHeaderConf.showLocaleSwitch);
432
- const getShowSettingTheme = computed(() => getHeaderConf.showSettingTheme);
433
- const getShowFullHeaderRef = computed(() => {
434
- return !unref(getIsSidebarType) && !unref(getIsMixSidebar) && !unref(getIsTopMenu);
435
- });
436
- const getHeaderHeight = computed(() => {
437
- let height = 0;
438
- height += HEADER_HEIGHT;
439
- if (unref(getShowMultipleTab) && !unref(getSplit) && !unref(getMultipleTabPosIsTop)) {
440
- height += TABS_HEIGHT;
441
- }
442
- return height;
443
- });
444
- const getTabsHeight = computed(() => TABS_HEIGHT);
445
- const getShowInsetHeaderRef = computed(() => {
446
- return unref(getIsSidebarType) || unref(getIsTopMenu) || unref(getIsMixSidebar);
447
- });
448
- const getShowBackToTop = computed(() => getHeaderConf.showBackToTop);
449
- const getIsZH = computed(() => {
450
- let local = DtCache.getLocal(CacheKey.LOCALE);
451
- if (!local)
452
- return true;
453
- return local === Language.ZH;
454
- });
455
- const getUiSize = computed(() => getHeaderConf?.size ?? UiSize.SMALL);
456
- const getShowUiSize = computed(() => getHeaderConf?.showSize);
457
- const getShowLogo = computed(() => getHeaderConf.showLogo);
458
- const getShowLoginOut = computed(() => getHeaderConf.showLoginOut);
459
- const loginOutClick = getHeaderConf.logoutClick;
460
- return {
461
- getHeaderTheme,
462
- getFixed,
463
- getShowSearch,
464
- getShowHeaderLogo,
465
- getShowHeaderTrigger,
466
- getShowBread,
467
- getShowTopMenu,
468
- getShowFullScreen,
469
- getShowLocale,
470
- getShowSettingTheme,
471
- getShowNotice,
472
- getShowFullHeaderRef,
473
- getHeaderHeight,
474
- getTabsHeight,
475
- getShowInsetHeaderRef,
476
- getShowBackToTop,
477
- getIsZH,
478
- getUiSize,
479
- getShowLogo,
480
- getShowLoginOut,
481
- getShowUiSize,
482
- loginOutClick
483
- };
484
- }
485
20
  function useLabelWidth(schemaItemRef, propsRef) {
486
21
  const { getIsZH } = useHeader();
487
22
  const { appConf } = useAppStore();
@@ -581,7 +116,7 @@ function useFormValue(props, key = "value", changeEvent = "change", emitData) {
581
116
  });
582
117
  return [state, setState, defaultState];
583
118
  }
584
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
119
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
585
120
  __name: "radioButton",
586
121
  props: {
587
122
  value: {
@@ -632,8 +167,49 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
632
167
  };
633
168
  }
634
169
  });
170
+ const _hoisted_1$1 = { class: "input-with-dialog" };
171
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
172
+ __name: "formInputUseDialog",
173
+ setup(__props) {
174
+ const { t } = useI18n("UI");
175
+ const attrs = useAttrs();
176
+ const bindProps = computed(() => {
177
+ return {
178
+ ...omit(attrs, [
179
+ "formValues"
180
+ ]),
181
+ disabled: true
182
+ };
183
+ });
184
+ function onClickInput() {
185
+ const { model, schema = {} } = attrs.formValues;
186
+ if (!schema.openDialog || !isFunction(schema.openDialog)) {
187
+ error(t("MUSE_FUNCTION"));
188
+ return;
189
+ }
190
+ schema.openDialog(model);
191
+ }
192
+ function clearProps() {
193
+ const { model, schema = {} } = attrs.formValues;
194
+ [...schema.extraName, schema.name].forEach((it) => model[it] = null);
195
+ }
196
+ return (_ctx, _cache) => {
197
+ return openBlock(), createElementBlock("div", _hoisted_1$1, [
198
+ createElementVNode("div", { onClick: onClickInput }, [
199
+ createVNode(unref(Input), normalizeProps(guardReactiveProps(unref(bindProps))), null, 16)
200
+ ]),
201
+ unref(attrs).formValues?.schema?.extraName?.length ? (openBlock(), createElementBlock("i", {
202
+ key: 0,
203
+ class: "i mdi:close-circle",
204
+ onClick: clearProps
205
+ })) : createCommentVNode("", true)
206
+ ]);
207
+ };
208
+ }
209
+ });
635
210
  const components = {
636
211
  Input,
212
+ InputWithDialog: _sfc_main$3,
637
213
  InputTextArea: Input.TextArea,
638
214
  InputSearch: Input.Search,
639
215
  InputGroup: Input.Group,
@@ -642,7 +218,7 @@ const components = {
642
218
  TreeSelect,
643
219
  Radio,
644
220
  RadioGroup: Radio.Group,
645
- RadioButtonGroup: _sfc_main$3,
221
+ RadioButtonGroup: _sfc_main$4,
646
222
  Checkbox,
647
223
  CheckboxGroup: Checkbox.Group,
648
224
  AutoComplete,
@@ -1001,13 +577,35 @@ const _sfc_main$2 = {
1001
577
  colProps,
1002
578
  component,
1003
579
  render,
1004
- slot
580
+ slot,
581
+ span
1005
582
  } = props.schema;
1006
583
  const {
1007
584
  colProps: gColProps,
1008
- mode
585
+ mode,
586
+ span: gSpan
1009
587
  } = props.formProps;
1010
- let _colProps = colProps || gColProps || (mode === "search" ? appConf.ui.form.searchColspan : appConf.ui.form.dialogColspan);
588
+ let _colProps = {};
589
+ if (component === "InputTextArea") {
590
+ _colProps = {
591
+ span: 24
592
+ };
593
+ }
594
+ if (!isUnDef(colProps)) {
595
+ _colProps = colProps;
596
+ } else if (!isUnDef(span)) {
597
+ _colProps = {
598
+ span
599
+ };
600
+ } else if (!isUnDef(gColProps)) {
601
+ _colProps = gColProps;
602
+ } else if (!isUnDef(gSpan)) {
603
+ _colProps = {
604
+ span: gSpan
605
+ };
606
+ } else {
607
+ _colProps = mode === "search" ? appConf.ui.form.searchColspan : appConf.ui.form.dialogColspan;
608
+ }
1011
609
  const values = unref(getValues);
1012
610
  if (!component) {
1013
611
  if (!render && !renderCol && !slot && !colSlot) {
@@ -1018,9 +616,9 @@ const _sfc_main$2 = {
1018
616
  if (component === "Divider") {
1019
617
  let _slot;
1020
618
  let cprops = unref(getComponentProps);
1021
- const span = cprops?.span ?? 24;
619
+ const span2 = cprops?.span ?? 24;
1022
620
  return createVNode(Col, {
1023
- "span": span
621
+ "span": span2
1024
622
  }, {
1025
623
  default: () => [createVNode(Divider, cprops, _isSlot(_slot = renderLabel()) ? _slot : {
1026
624
  default: () => [_slot]
@@ -1501,7 +1099,7 @@ function useFormActions(opt) {
1501
1099
  schemas,
1502
1100
  minShowColumn = appConf.ui.form?.minShowColumn || 2,
1503
1101
  showAdvancedButton = true
1504
- } = unref(opt.getProps);
1102
+ } = unref(getProps);
1505
1103
  let schema = [...schemas];
1506
1104
  if (showAdvancedButton) {
1507
1105
  schema = schemas.reduce((t, it, index) => {
@@ -1570,8 +1168,10 @@ const BasicProps = {
1570
1168
  default: () => ({})
1571
1169
  },
1572
1170
  colProps: {
1573
- type: Object,
1574
- default: () => ({})
1171
+ type: Object
1172
+ },
1173
+ span: {
1174
+ type: Number
1575
1175
  },
1576
1176
  size: {
1577
1177
  type: String
@@ -1653,14 +1253,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1653
1253
  const propsRef = ref();
1654
1254
  const schemaRef = ref(null);
1655
1255
  const getProps = computed(() => {
1656
- let colProps = props.colProps;
1657
- if (isEmpty(props.colProps)) {
1658
- colProps = props.mode === "search" ? getAppConf.ui.form.searchColspan || { span: 8 } : getAppConf.ui.form.dialogColspan || { span: 12 };
1659
- }
1660
1256
  return {
1661
1257
  ...props,
1662
1258
  ...getAppConf.ui.form,
1663
- colProps,
1664
1259
  ...unref(propsRef)
1665
1260
  };
1666
1261
  });
@@ -1758,7 +1353,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1758
1353
  buttonList = [...buttons];
1759
1354
  } else if (mode === "search" && !buttons) {
1760
1355
  SEARCH_BTNS.forEach((it) => {
1761
- it.loading = it.name === SEARCH_BTN_NAME ? loading?.onSearch : loading?.onReset;
1356
+ it.loading = it.label === SEARCH_BTN_NAME ? loading?.onSearch : loading?.onReset;
1762
1357
  buttonList.push(it);
1763
1358
  });
1764
1359
  }
@@ -1939,5 +1534,6 @@ function useForm(props) {
1939
1534
  }
1940
1535
  export {
1941
1536
  _sfc_main as DtForm,
1537
+ _sfc_main$1 as DtFormButtons,
1942
1538
  useForm
1943
1539
  };
@@ -66,7 +66,9 @@ declare const _sfc_main: {
66
66
  };
67
67
  colProps: {
68
68
  type: PropType<Partial<import("../types/form.type").ColEx>>;
69
- default: () => {};
69
+ };
70
+ span: {
71
+ type: NumberConstructor;
70
72
  };
71
73
  size: {
72
74
  type: PropType<"middle" | "small" | "large">;
@@ -2,15 +2,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
2
2
  value: StringConstructor;
3
3
  placeholder: StringConstructor;
4
4
  }, {
5
- t: {
6
- (key: string): string;
7
- (key: string, locale: string): string;
8
- (key: string, locale: string, list: unknown[]): string;
9
- (key: string, locale: string, named: Record<string, unknown>): string;
10
- (key: string, list: unknown[]): string;
11
- (key: string, named: Record<string, unknown>): string;
12
- };
13
- getUiSize: import("vue").ComputedRef<import("../../../../theme/src/enums").UiSize>;
5
+ getUiSize: import("vue").ComputedRef<import('../../../../theme').UiSize>;
14
6
  iconRef: any;
15
7
  props: any;
16
8
  state: any;
@@ -457,7 +449,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
457
449
  inputPrefixCls: StringConstructor;
458
450
  enterButton: import("vue-types").VueTypeValidableDef<any>;
459
451
  onSearch: {
460
- type: import("vue").PropType<(value: string, event?: import("ant-design-vue/lib/_util/EventInterface").ChangeEvent | MouseEvent | KeyboardEvent) => void>;
452
+ type: import("vue").PropType<(value: string, event?: MouseEvent | import("ant-design-vue/lib/_util/EventInterface").ChangeEvent | KeyboardEvent) => void>;
461
453
  };
462
454
  id: StringConstructor;
463
455
  prefixCls: StringConstructor;
@@ -529,7 +521,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
529
521
  inputPrefixCls: StringConstructor;
530
522
  enterButton: import("vue-types").VueTypeValidableDef<any>;
531
523
  onSearch: {
532
- type: import("vue").PropType<(value: string, event?: import("ant-design-vue/lib/_util/EventInterface").ChangeEvent | MouseEvent | KeyboardEvent) => void>;
524
+ type: import("vue").PropType<(value: string, event?: MouseEvent | import("ant-design-vue/lib/_util/EventInterface").ChangeEvent | KeyboardEvent) => void>;
533
525
  };
534
526
  id: StringConstructor;
535
527
  prefixCls: StringConstructor;