@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,297 +1,12 @@
1
- import { Button, FormItem, Col, Drawer } from "ant-design-vue/es";
1
+ import { Drawer } from "ant-design-vue/es";
2
2
  import "ant-design-vue/es/drawer/style";
3
- import { defineComponent, getCurrentInstance, ref, inject, computed, onUnmounted, h, provide, onMounted, nextTick as nextTick$1, unref, onBeforeUnmount, openBlock, createElementBlock, createElementVNode, normalizeClass, normalizeStyle, createBlock, resolveDynamicComponent, withCtx, renderSlot, createVNode, mergeProps, toDisplayString, watch, resolveDirective, normalizeProps, Fragment, renderList, withDirectives, createCommentVNode, createTextVNode, useAttrs, toRaw, createSlots, guardReactiveProps, reactive, watchEffect } from "vue";
4
- import { off, on, useI18n, dispatchResize, isFunction, DtCache, CacheKey, deepMerge, isUnDef, useApp, isObject, error } from "@dt-frames/core";
5
- import "ant-design-vue/es/col/style";
6
- import "ant-design-vue/es/form/style";
7
- import "ant-design-vue/es/button/style";
8
- const isServer = typeof window === "undefined";
9
- const BAR_MAP = {
10
- vertical: {
11
- offset: "offsetHeight",
12
- scroll: "scrollTop",
13
- scrollSize: "scrollHeight",
14
- size: "height",
15
- key: "vertical",
16
- axis: "Y",
17
- client: "clientY",
18
- direction: "top"
19
- },
20
- horizontal: {
21
- offset: "offsetWidth",
22
- scroll: "scrollLeft",
23
- scrollSize: "scrollWidth",
24
- size: "width",
25
- key: "horizontal",
26
- axis: "X",
27
- client: "clientX",
28
- direction: "left"
29
- }
30
- };
31
- function renderThumbStyle({ move, size, bar }) {
32
- const style = {};
33
- const translate = `translate${bar.axis}(${move}%)`;
34
- style[bar.size] = size;
35
- style.transform = translate;
36
- style.msTransform = translate;
37
- style.webkitTransform = translate;
38
- return style;
39
- }
40
- function resizeHandler(entries) {
41
- for (const entry of entries) {
42
- const listeners = entry.target.__resizeListeners__ || [];
43
- if (listeners.length) {
44
- listeners.forEach((fn) => {
45
- fn();
46
- });
47
- }
48
- }
49
- }
50
- function addResizeListener(element, fn) {
51
- if (isServer)
52
- return;
53
- if (!element.__resizeListeners__) {
54
- element.__resizeListeners__ = [];
55
- element.__ro__ = new ResizeObserver(resizeHandler);
56
- element.__ro__.observe(element);
57
- }
58
- element.__resizeListeners__.push(fn);
59
- }
60
- function removeResizeListener(element, fn) {
61
- if (!element || !element.__resizeListeners__)
62
- return;
63
- element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);
64
- if (!element.__resizeListeners__.length) {
65
- element.__ro__.disconnect();
66
- }
67
- }
68
- const Bar = defineComponent({
69
- name: "Bar",
70
- props: {
71
- vertical: Boolean,
72
- size: String,
73
- move: Number
74
- },
75
- setup(props) {
76
- const instance = getCurrentInstance();
77
- const thumb = ref();
78
- const wrap = inject("scroll-bar-wrap", {});
79
- const bar = computed(() => {
80
- return BAR_MAP[props.vertical ? "vertical" : "horizontal"];
81
- });
82
- const barStore = ref({});
83
- const cursorDown = ref();
84
- const clickThumbHandler = (e) => {
85
- if (e.ctrlKey || e.button === 2) {
86
- return;
87
- }
88
- window.getSelection()?.removeAllRanges();
89
- startDrag(e);
90
- barStore.value[bar.value.axis] = e.currentTarget[bar.value.offset] - (e[bar.value.client] - e.currentTarget.getBoundingClientRect()[bar.value.direction]);
91
- };
92
- const clickTrackHandler = (e) => {
93
- const offset = Math.abs(
94
- e.target.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]
95
- );
96
- const thumbHalf = thumb.value[bar.value.offset] / 2;
97
- const thumbPositionPercentage = (offset - thumbHalf) * 100 / instance?.vnode.el?.[bar.value.offset];
98
- wrap.value[bar.value.scroll] = thumbPositionPercentage * wrap.value[bar.value.scrollSize] / 100;
99
- };
100
- const startDrag = (e) => {
101
- e.stopImmediatePropagation();
102
- cursorDown.value = true;
103
- on(document, "mousemove", mouseMoveDocumentHandler);
104
- on(document, "mouseup", mouseUpDocumentHandler);
105
- document.onselectstart = () => false;
106
- };
107
- const mouseMoveDocumentHandler = (e) => {
108
- if (cursorDown.value === false)
109
- return;
110
- const prevPage = barStore.value[bar.value.axis];
111
- if (!prevPage)
112
- return;
113
- const offset = (instance?.vnode.el?.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]) * -1;
114
- const thumbClickPosition = thumb.value[bar.value.offset] - prevPage;
115
- const thumbPositionPercentage = (offset - thumbClickPosition) * 100 / instance?.vnode.el?.[bar.value.offset];
116
- wrap.value[bar.value.scroll] = thumbPositionPercentage * wrap.value[bar.value.scrollSize] / 100;
117
- };
118
- function mouseUpDocumentHandler() {
119
- cursorDown.value = false;
120
- barStore.value[bar.value.axis] = 0;
121
- off(document, "mousemove", mouseMoveDocumentHandler);
122
- document.onselectstart = null;
123
- }
124
- onUnmounted(() => {
125
- off(document, "mouseup", mouseUpDocumentHandler);
126
- });
127
- return () => h(
128
- "div",
129
- {
130
- class: ["scrollbar__bar", "is-" + bar.value.key],
131
- onMousedown: clickTrackHandler
132
- },
133
- h("div", {
134
- ref: thumb,
135
- class: "scrollbar__thumb",
136
- onMousedown: clickThumbHandler,
137
- style: renderThumbStyle({
138
- size: props.size,
139
- move: props.move,
140
- bar: bar.value
141
- })
142
- })
143
- );
144
- }
145
- });
146
- const _hoisted_1$3 = { class: "scrollbar relative h-full overflow-hidden" };
147
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
148
- __name: "scroll-bar",
149
- props: {
150
- wrapClass: {
151
- type: [String, Array],
152
- default: ""
153
- },
154
- wrapStyle: Array,
155
- viewClass: {
156
- type: [String, Array],
157
- default: ""
158
- },
159
- viewStyle: {
160
- type: [String, Array],
161
- default: ""
162
- },
163
- noresize: Boolean,
164
- tag: {
165
- type: String,
166
- default: "div"
167
- }
168
- },
169
- setup(__props) {
170
- const props = __props;
171
- const sizeWidth = ref("0");
172
- const sizeHeight = ref("0");
173
- const moveX = ref(0);
174
- const moveY = ref(0);
175
- const wrap = ref();
176
- const resize = ref();
177
- provide("scroll-bar-wrap", wrap);
178
- const style = computed(() => {
179
- let rsStyle = {};
180
- if (Array.isArray(props.wrapStyle)) {
181
- props.wrapStyle.forEach((it) => {
182
- if (it)
183
- rsStyle = Object.assign({}, rsStyle, it);
184
- });
185
- }
186
- return rsStyle;
187
- });
188
- const handleScroll = () => {
189
- moveY.value = unref(wrap).scrollTop * 100 / unref(wrap).clientHeight;
190
- moveX.value = unref(wrap).scrollLeft * 100 / unref(wrap).clientWidth;
191
- };
192
- const update = () => {
193
- if (!unref(wrap))
194
- return;
195
- const heightPercentage = unref(wrap).clientHeight * 100 / unref(wrap).scrollHeight;
196
- const widthPercentage = unref(wrap).clientWidth * 100 / unref(wrap).scrollWidth;
197
- sizeHeight.value = heightPercentage < 100 ? heightPercentage + "%" : "";
198
- sizeWidth.value = widthPercentage < 100 ? widthPercentage + "%" : "";
199
- };
200
- onMounted(() => {
201
- nextTick$1(update);
202
- if (!props.noresize) {
203
- addResizeListener(unref(resize), update);
204
- addResizeListener(unref(wrap), update);
205
- addEventListener("resize", update);
206
- }
207
- });
208
- onBeforeUnmount(() => {
209
- if (!props.noresize) {
210
- removeResizeListener(unref(resize), update);
211
- removeResizeListener(unref(wrap), update);
212
- removeEventListener("resize", update);
213
- }
214
- });
215
- return (_ctx, _cache) => {
216
- return openBlock(), createElementBlock("div", _hoisted_1$3, [
217
- createElementVNode("div", {
218
- ref_key: "wrap",
219
- ref: wrap,
220
- class: normalizeClass([[__props.wrapClass, "scrollbar__wrap--hidden-default"], "h-full overflow-auto"]),
221
- style: normalizeStyle(unref(style)),
222
- onScroll: handleScroll
223
- }, [
224
- (openBlock(), createBlock(resolveDynamicComponent(__props.tag), {
225
- class: normalizeClass(["box-border", __props.viewClass]),
226
- ref_key: "resize",
227
- ref: resize,
228
- style: normalizeStyle(__props.viewStyle)
229
- }, {
230
- default: withCtx(() => [
231
- renderSlot(_ctx.$slots, "default")
232
- ]),
233
- _: 3
234
- }, 8, ["class", "style"]))
235
- ], 38),
236
- createVNode(unref(Bar), {
237
- move: moveX.value,
238
- size: sizeWidth.value
239
- }, null, 8, ["move", "size"]),
240
- createVNode(unref(Bar), {
241
- vertical: "",
242
- move: moveY.value,
243
- size: sizeHeight.value
244
- }, null, 8, ["move", "size"])
245
- ]);
246
- };
247
- }
248
- });
249
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
250
- __name: "scroll-container",
251
- setup(__props) {
252
- const scrollbarRef = ref(null);
253
- return (_ctx, _cache) => {
254
- return openBlock(), createBlock(_sfc_main$6, mergeProps({
255
- ref_key: "scrollbarRef",
256
- ref: scrollbarRef
257
- }, _ctx.$attrs, { class: "w-full h-full" }), {
258
- default: withCtx(() => [
259
- renderSlot(_ctx.$slots, "default")
260
- ]),
261
- _: 3
262
- }, 16);
263
- };
264
- }
265
- });
266
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
267
- __name: "slot-container",
268
- props: {
269
- template: {
270
- type: Function
271
- },
272
- data: {
273
- type: Object
274
- }
275
- },
276
- setup(__props) {
277
- const props = __props;
278
- const Container = h("div", [props.template(props.data)]);
279
- return (_ctx, _cache) => {
280
- return openBlock(), createBlock(unref(Container));
281
- };
282
- }
283
- });
284
- const withInstall = (comp) => {
285
- comp.install = (app) => {
286
- app.component(comp.name, comp);
287
- };
288
- return comp;
289
- };
290
- const DtScrollContainer = withInstall(_sfc_main$5);
291
- withInstall(_sfc_main$4);
292
- const _hoisted_1$2 = { class: "flex h-full items-center" };
293
- const _hoisted_2$1 = { class: "pr-12" };
294
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3
+ import { defineComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, renderSlot, computed, createVNode, unref, useAttrs, ref, toRaw, getCurrentInstance, watch, createBlock, mergeProps, createSlots, withCtx, normalizeStyle, renderList, normalizeProps, guardReactiveProps, reactive, watchEffect, onUnmounted } from "vue";
4
+ import { useI18n, DtCache, CacheKey, deepMerge, isUnDef, isFunction, useApp, isObject, error } from "@dt-frames/core";
5
+ import { DtScrollContainer } from "../container";
6
+ import { DtFormButtons } from "../form";
7
+ const _hoisted_1$1 = { class: "flex h-full items-center" };
8
+ const _hoisted_2 = { class: "pr-12" };
9
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
295
10
  __name: "DrawerHeader",
296
11
  props: {
297
12
  title: {
@@ -300,174 +15,15 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
300
15
  },
301
16
  setup(__props) {
302
17
  return (_ctx, _cache) => {
303
- return openBlock(), createElementBlock("div", _hoisted_1$2, [
18
+ return openBlock(), createElementBlock("div", _hoisted_1$1, [
304
19
  createElementVNode("span", null, toDisplayString(__props.title), 1),
305
- createElementVNode("span", _hoisted_2$1, [
20
+ createElementVNode("span", _hoisted_2, [
306
21
  renderSlot(_ctx.$slots, "titleToolbar")
307
22
  ])
308
23
  ]);
309
24
  };
310
25
  }
311
26
  });
312
- const _hoisted_1$1 = {
313
- key: 0,
314
- className: "preIcon pr-1"
315
- };
316
- const _hoisted_2 = {
317
- key: 0,
318
- className: "preIcon pl-1"
319
- };
320
- const _hoisted_3 = { class: "text" };
321
- const _hoisted_4 = /* @__PURE__ */ createElementVNode("i", { class: "text-2xl i ic:baseline-arrow-drop-down" }, null, -1);
322
- const _hoisted_5 = [
323
- _hoisted_4
324
- ];
325
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
326
- __name: "FormButtons",
327
- props: {
328
- mode: {
329
- type: String,
330
- default: "search"
331
- },
332
- show: {
333
- type: Boolean,
334
- default: true
335
- },
336
- showAdvancedButton: {
337
- type: Boolean,
338
- default: true
339
- },
340
- minShowColumn: {
341
- type: Number,
342
- default: 2
343
- },
344
- buttonList: {
345
- type: [Array],
346
- default: []
347
- },
348
- isAdvanced: {
349
- type: Boolean,
350
- default: true
351
- }
352
- },
353
- emits: ["handle-method"],
354
- setup(__props, { emit: emits }) {
355
- const props = __props;
356
- const { t } = useI18n();
357
- const advancedRef = ref(props.isAdvanced);
358
- let key = 0;
359
- const showAdvanceRef = computed(() => {
360
- return props.mode === "search" ? props.showAdvancedButton : false;
361
- });
362
- const colOpt = computed(() => {
363
- let style = {
364
- textAlign: "right"
365
- };
366
- if (props.mode === "dialog") {
367
- Object.assign(style, {
368
- display: "inline-block"
369
- });
370
- }
371
- return { style };
372
- });
373
- const getAdvanceClass = computed(() => {
374
- return [
375
- "basic-arrow",
376
- { "basic-arrow--active": !advancedRef.value }
377
- ];
378
- });
379
- const toggleAdvanced = () => {
380
- advancedRef.value = !advancedRef.value;
381
- dispatchResize();
382
- emits("handle-method", advancedRef.value);
383
- };
384
- function handleBtnClick(button) {
385
- if (button.onClick && isFunction(button.onClick)) {
386
- button.onClick();
387
- } else {
388
- emits("handle-method", button);
389
- }
390
- }
391
- watch(() => props.isAdvanced, (v) => {
392
- if (v) {
393
- nextTick$1(() => toggleAdvanced());
394
- }
395
- }, {
396
- immediate: true
397
- });
398
- watch(
399
- () => props.buttonList,
400
- (v) => key = new Date().getTime(),
401
- {
402
- immediate: true,
403
- deep: true
404
- }
405
- );
406
- return (_ctx, _cache) => {
407
- const _component_AButton = Button;
408
- const _component_AFormItem = FormItem;
409
- const _component_ACol = Col;
410
- const _directive_icon = resolveDirective("icon");
411
- const _directive_auth = resolveDirective("auth");
412
- return __props.show ? (openBlock(), createBlock(_component_ACol, normalizeProps(mergeProps({ key: 0 }, unref(colOpt))), {
413
- default: withCtx(() => [
414
- createVNode(_component_AFormItem, {
415
- class: "dt-form-btns",
416
- style: normalizeStyle({
417
- "margin-bottom": __props.mode === "search" ? "16px" : "0px"
418
- })
419
- }, {
420
- default: withCtx(() => [
421
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.buttonList, (button) => {
422
- return openBlock(), createElementBlock(Fragment, null, [
423
- (button.show === void 0 ? true : button.show) ? withDirectives((openBlock(), createBlock(_component_AButton, {
424
- type: button.type,
425
- class: normalizeClass(button.class),
426
- loading: button.loading,
427
- disabled: button.disabled,
428
- key: unref(key),
429
- onClick: ($event) => handleBtnClick(button)
430
- }, {
431
- icon: withCtx(() => [
432
- button.preIcon ? withDirectives((openBlock(), createElementBlock("span", _hoisted_1$1, null, 512)), [
433
- [_directive_icon, button.preIcon]
434
- ]) : createCommentVNode("", true)
435
- ]),
436
- default: withCtx(() => [
437
- createTextVNode(" " + toDisplayString(unref(t)(button.label)) + " ", 1),
438
- button.postIcon ? withDirectives((openBlock(), createElementBlock("span", _hoisted_2, null, 512)), [
439
- [_directive_icon, button.postIcon]
440
- ]) : createCommentVNode("", true)
441
- ]),
442
- _: 2
443
- }, 1032, ["type", "class", "loading", "disabled", "onClick"])), [
444
- [_directive_auth, button.auth]
445
- ]) : createCommentVNode("", true)
446
- ], 64);
447
- }), 256)),
448
- unref(showAdvanceRef) ? (openBlock(), createBlock(_component_AButton, {
449
- key: 0,
450
- type: "link",
451
- class: "advanced",
452
- onClick: toggleAdvanced
453
- }, {
454
- default: withCtx(() => [
455
- createElementVNode("span", _hoisted_3, toDisplayString(advancedRef.value ? unref(t)("UI.ADVANCED") : unref(t)("UI.EXPAND")), 1),
456
- createElementVNode("span", {
457
- class: normalizeClass(unref(getAdvanceClass))
458
- }, _hoisted_5, 2)
459
- ]),
460
- _: 1
461
- })) : createCommentVNode("", true)
462
- ]),
463
- _: 1
464
- }, 8, ["style"])
465
- ]),
466
- _: 1
467
- }, 16)) : createCommentVNode("", true);
468
- };
469
- }
470
- });
471
27
  const _hoisted_1 = {
472
28
  class: "flex items-center",
473
29
  style: { gap: "10px" }
@@ -492,8 +48,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
492
48
  if (props.buttons && props.buttons.length)
493
49
  return props.buttons;
494
50
  let buttonActions = [
495
- { t: "\u4FDD\u5B58", label: props.okText || t("SAVE"), preIcon: "mdi:content-save", type: "primary", flag: "OK" },
496
- { t: "\u5173\u95ED", label: props.cancelText || t("CLOSE"), preIcon: "mdi:close", flag: "CANCEL" }
51
+ { t: "\u5173\u95ED", label: props.cancelText || t("CLOSE"), preIcon: "mdi:close", flag: "CANCEL" },
52
+ { t: "\u4FDD\u5B58", label: props.okText || t("SAVE"), preIcon: "mdi:content-save", type: "primary", flag: "OK" }
497
53
  ];
498
54
  if (!props.showSave)
499
55
  buttonActions = buttonActions.filter((btn) => btn.flag !== "OK");
@@ -514,7 +70,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
514
70
  return (_ctx, _cache) => {
515
71
  return openBlock(), createElementBlock("div", _hoisted_1, [
516
72
  renderSlot(_ctx.$slots, "appendFooter"),
517
- createVNode(_sfc_main$2, {
73
+ createVNode(unref(DtFormButtons), {
518
74
  mode: "dialog",
519
75
  buttonList: unref(buttonList),
520
76
  onHandleMethod: _cache[0] || (_cache[0] = ($event) => handleMethod($event))
@@ -597,16 +153,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
597
153
  visible: unref(visibleRef),
598
154
  bodyStyle: {
599
155
  padding: 0
156
+ },
157
+ style: {
158
+ position: "absolute"
600
159
  }
601
160
  };
602
161
  const { getContainer, width } = opt;
603
- if (!getContainer) {
162
+ if (isUnDef(getContainer)) {
604
163
  opt = {
605
164
  ...opt,
606
165
  getContainer: ".dt-layout-content",
607
- style: {
608
- position: "absolute"
609
- },
610
166
  width: width || "100%"
611
167
  };
612
168
  } else {
@@ -679,7 +235,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
679
235
  !_ctx.$slots.title ? {
680
236
  name: "title",
681
237
  fn: withCtx(() => [
682
- createVNode(_sfc_main$3, {
238
+ createVNode(_sfc_main$2, {
683
239
  title: unref(getProps).title
684
240
  }, {
685
241
  titleToolbar: withCtx(() => [
@@ -830,6 +386,12 @@ function useDrawer(props, setModalData) {
830
386
  };
831
387
  return [register, methods];
832
388
  }
389
+ const withInstall = (comp) => {
390
+ comp.install = (app) => {
391
+ app.component(comp.name, comp);
392
+ };
393
+ return comp;
394
+ };
833
395
  const DtDrawer = withInstall(_sfc_main);
834
396
  export {
835
397
  DtDrawer,
@@ -29,90 +29,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
29
29
  props: any;
30
30
  buttonList: import("vue").ComputedRef<ButtonProps[]>;
31
31
  handleMethod: (item: ButtonProps) => void;
32
- DtFormButtons: import("vue").DefineComponent<{
33
- mode: {
34
- type: PropType<"search" | "dialog">;
35
- default: string;
36
- };
37
- show: {
38
- type: BooleanConstructor;
39
- default: boolean;
40
- };
41
- showAdvancedButton: {
42
- type: BooleanConstructor;
43
- default: boolean;
44
- };
45
- minShowColumn: {
46
- type: NumberConstructor;
47
- default: number;
48
- };
49
- buttonList: {
50
- type: PropType<ButtonProps[]>;
51
- default: any[];
52
- };
53
- isAdvanced: {
54
- type: BooleanConstructor;
55
- default: boolean;
56
- };
57
- }, {
58
- props: any;
59
- emits: (event: "handle-method", ...args: any[]) => void;
60
- t: {
61
- (key: string): string;
62
- (key: string, locale: string): string;
63
- (key: string, locale: string, list: unknown[]): string;
64
- (key: string, locale: string, named: Record<string, unknown>): string;
65
- (key: string, list: unknown[]): string;
66
- (key: string, named: Record<string, unknown>): string;
67
- };
68
- advancedRef: import("vue").Ref<{
69
- valueOf: () => boolean;
70
- }>;
71
- key: number;
72
- showAdvanceRef: import("vue").ComputedRef<boolean>;
73
- colOpt: import("vue").ComputedRef<{
74
- style: import("@dt-frames/core").Recordable<any>;
75
- }>;
76
- getAdvanceClass: import("vue").ComputedRef<(string | {
77
- 'basic-arrow--active': boolean;
78
- })[]>;
79
- toggleAdvanced: () => void;
80
- handleBtnClick: (button: ButtonProps) => void;
81
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "handle-method"[], "handle-method", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
82
- mode: {
83
- type: PropType<"search" | "dialog">;
84
- default: string;
85
- };
86
- show: {
87
- type: BooleanConstructor;
88
- default: boolean;
89
- };
90
- showAdvancedButton: {
91
- type: BooleanConstructor;
92
- default: boolean;
93
- };
94
- minShowColumn: {
95
- type: NumberConstructor;
96
- default: number;
97
- };
98
- buttonList: {
99
- type: PropType<ButtonProps[]>;
100
- default: any[];
101
- };
102
- isAdvanced: {
103
- type: BooleanConstructor;
104
- default: boolean;
105
- };
106
- }>> & {
107
- "onHandle-method"?: (...args: any[]) => any;
108
- }, {
109
- mode: "search" | "dialog";
110
- show: boolean;
111
- showAdvancedButton: boolean;
112
- minShowColumn: number;
113
- buttonList: ButtonProps[];
114
- isAdvanced: boolean;
115
- }>;
32
+ readonly DtFormButtons: import("vue").DefineComponent<{}, {}, any, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
116
33
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("handleSave" | "handleCancel")[], "handleSave" | "handleCancel", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
117
34
  buttons: PropType<ButtonProps[]>;
118
35
  showSave: {