@dt-frames/ui 2.0.17 → 2.0.18
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/drawer/index.d.ts +3 -4
- package/es/components/drawer/index.js +11 -15
- package/es/components/drawer/index.less +6 -0
- package/es/components/drawer/src/index.d.ts +5 -7
- package/es/components/drawer/src/types/index.type.d.ts +3 -1
- package/es/components/form/index.js +8 -4
- package/es/components/form/src/components/FormButtons.d.ts +3056 -4
- package/es/components/form/src/components/FormItem.d.ts +2 -2
- package/es/components/form/src/components/formIcon.d.ts +0 -1209
- package/es/components/form/src/components/formInputUseDialog.d.ts +0 -894
- package/es/components/form/src/props.d.ts +3 -3
- package/es/components/form/src/types/items.type.d.ts +8 -0
- package/es/components/modal/index.js +19 -7
- package/es/components/modal/index.less +1 -9
- package/es/components/source/index.js +15 -7
- package/es/components/table/index.js +156 -74
- package/es/components/table/index.less +5 -1
- package/es/components/tree/index.js +47 -55
- package/es/components/tree/src/type/tree.d.ts +0 -4
- package/es/components/tree/src/utils/tree.d.ts +3 -1
- package/es/components/upload/index.js +103 -41
- package/es/components/upload/src/basicProps.d.ts +5 -1
- package/es/components/upload/src/hooks/useFile.d.ts +7 -6
- package/es/components/upload/src/index.d.ts +16 -0
- package/es/components/upload/src/type/file.d.ts +9 -2
- package/es/components/upload/src/utils/fileSize.d.ts +1 -0
- package/es/theme/index.js +149 -97
- package/es/theme/index.less +14 -0
- package/es/theme/src/components/sider/index.d.ts +1 -1
- package/es/theme/src/components/sider/mix-sider.d.ts +1 -1
- package/es/theme/src/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@ export declare const BasicProps: {
|
|
|
16
16
|
default: () => {};
|
|
17
17
|
};
|
|
18
18
|
layout: {
|
|
19
|
-
type: PropType<"
|
|
19
|
+
type: PropType<"inline" | "horizontal" | "vertical">;
|
|
20
20
|
default: string;
|
|
21
21
|
};
|
|
22
22
|
labelWidth: {
|
|
@@ -41,8 +41,8 @@ export declare const BasicProps: {
|
|
|
41
41
|
};
|
|
42
42
|
rowProps: {
|
|
43
43
|
type: PropType<Partial<import("vue").ExtractPropTypes<{
|
|
44
|
-
align: PropType<"
|
|
45
|
-
justify: PropType<"
|
|
44
|
+
align: PropType<"bottom" | "top" | "stretch" | "middle">;
|
|
45
|
+
justify: PropType<"space-around" | "space-between" | "center" | "end" | "start">;
|
|
46
46
|
prefixCls: StringConstructor;
|
|
47
47
|
gutter: {
|
|
48
48
|
type: PropType<import("ant-design-vue/lib/grid/Row").Gutter | [import("ant-design-vue/lib/grid/Row").Gutter, import("ant-design-vue/lib/grid/Row").Gutter]>;
|
|
@@ -383,12 +383,20 @@ export declare type Divider = {
|
|
|
383
383
|
export declare type InputWithDialog = Input & {
|
|
384
384
|
openDialog?: (model: Recordable) => void;
|
|
385
385
|
};
|
|
386
|
+
export declare type FieldNames = {
|
|
387
|
+
fileId?: string;
|
|
388
|
+
fileName?: string;
|
|
389
|
+
filePath?: string;
|
|
390
|
+
fileSize?: string;
|
|
391
|
+
fileType?: string;
|
|
392
|
+
};
|
|
386
393
|
export declare type Upload = {
|
|
387
394
|
uploadUrl?: string;
|
|
388
395
|
downloadUrl?: string;
|
|
389
396
|
buttonText?: string;
|
|
390
397
|
preIcon?: string;
|
|
391
398
|
data?: object | ((file: UploadFile) => object);
|
|
399
|
+
fieldNames?: FieldNames;
|
|
392
400
|
filename?: string;
|
|
393
401
|
accept?: string[];
|
|
394
402
|
customRequest?: (params: UploadRequestOption) => void;
|
|
@@ -3,7 +3,7 @@ import { reactive, ref, getCurrentInstance, watchEffect, unref, nextTick, onUnmo
|
|
|
3
3
|
import { Tooltip, Spin } from "ant-design-vue/es";
|
|
4
4
|
import "ant-design-vue/es/spin/style";
|
|
5
5
|
import { omit } from "lodash-es";
|
|
6
|
-
import { Modal } from "ant-design-vue";
|
|
6
|
+
import { Modal as Modal$1 } from "ant-design-vue";
|
|
7
7
|
import "ant-design-vue/es/modal/style";
|
|
8
8
|
import "ant-design-vue/es/tooltip/style";
|
|
9
9
|
import { DtFormButtons } from "../form";
|
|
@@ -318,16 +318,25 @@ const _sfc_main$3 = {
|
|
|
318
318
|
...props,
|
|
319
319
|
destroyOnClose: true,
|
|
320
320
|
onCancel,
|
|
321
|
+
centered: true,
|
|
321
322
|
getContainer: getPopupContainer()
|
|
322
323
|
};
|
|
323
324
|
if (!propsData?.visible)
|
|
324
325
|
return null;
|
|
325
|
-
return createVNode(Modal, propsData, _isSlot(_slot = extendSlots(slots)) ? _slot : {
|
|
326
|
+
return createVNode(Modal$1, propsData, _isSlot(_slot = extendSlots(slots)) ? _slot : {
|
|
326
327
|
default: () => [_slot]
|
|
327
328
|
});
|
|
328
329
|
};
|
|
329
330
|
}
|
|
330
331
|
};
|
|
332
|
+
const _export_sfc = (sfc, props) => {
|
|
333
|
+
const target = sfc.__vccOpts || sfc;
|
|
334
|
+
for (const [key, val] of props) {
|
|
335
|
+
target[key] = val;
|
|
336
|
+
}
|
|
337
|
+
return target;
|
|
338
|
+
};
|
|
339
|
+
const Modal = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/modal/src/components/Modal.vue"]]);
|
|
331
340
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
332
341
|
__name: "CloseIcon",
|
|
333
342
|
props: {
|
|
@@ -386,7 +395,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
386
395
|
]),
|
|
387
396
|
_: 1
|
|
388
397
|
}, 8, ["title"]))
|
|
389
|
-
], 64)) : createCommentVNode("", true),
|
|
398
|
+
], 64)) : createCommentVNode("v-if", true),
|
|
390
399
|
createElementVNode("i", {
|
|
391
400
|
class: "i mdi:close h-14 w-10 pr-4",
|
|
392
401
|
onClick: handleCancel
|
|
@@ -395,6 +404,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
395
404
|
};
|
|
396
405
|
}
|
|
397
406
|
});
|
|
407
|
+
const CloseIcon = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/modal/src/components/CloseIcon.vue"]]);
|
|
398
408
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
399
409
|
__name: "ModalFooter",
|
|
400
410
|
props: {
|
|
@@ -448,6 +458,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
448
458
|
};
|
|
449
459
|
}
|
|
450
460
|
});
|
|
461
|
+
const ModalFooter = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/modal/src/components/ModalFooter.vue"]]);
|
|
451
462
|
function useFullScreen(wrapClassName) {
|
|
452
463
|
const fullScreenRef = ref(false);
|
|
453
464
|
const getWrapClassName = computed(() => {
|
|
@@ -556,7 +567,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
556
567
|
});
|
|
557
568
|
return (_ctx, _cache) => {
|
|
558
569
|
const _component_ASpin = Spin;
|
|
559
|
-
return openBlock(), createBlock(
|
|
570
|
+
return openBlock(), createBlock(Modal, mergeProps(unref(getBindValue), { onCancel: handleCancel }), createSlots({
|
|
560
571
|
default: withCtx(() => [
|
|
561
572
|
createVNode(_component_ASpin, {
|
|
562
573
|
spinning: unref(getBindValue).loading,
|
|
@@ -573,7 +584,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
573
584
|
!_ctx.$slots.closeIcon ? {
|
|
574
585
|
name: "closeIcon",
|
|
575
586
|
fn: withCtx(() => [
|
|
576
|
-
createVNode(
|
|
587
|
+
createVNode(CloseIcon, {
|
|
577
588
|
canFullscreen: unref(getBindValue).canFullscreen,
|
|
578
589
|
fullScreen: unref(fullScreenRef),
|
|
579
590
|
onCancel: handleCancel,
|
|
@@ -592,7 +603,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
592
603
|
!_ctx.$slots.footer ? {
|
|
593
604
|
name: "footer",
|
|
594
605
|
fn: withCtx(() => [
|
|
595
|
-
createVNode(
|
|
606
|
+
createVNode(ModalFooter, {
|
|
596
607
|
authPrefix: unref(getBindValue).authPrefix,
|
|
597
608
|
buttons: propsRef.value?.footer,
|
|
598
609
|
showSave: unref(getBindValue).showOkBtn,
|
|
@@ -626,8 +637,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
626
637
|
};
|
|
627
638
|
}
|
|
628
639
|
});
|
|
640
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/modal/src/index.vue"]]);
|
|
629
641
|
export {
|
|
630
|
-
|
|
642
|
+
index as DtModal,
|
|
631
643
|
basicProps,
|
|
632
644
|
useModal,
|
|
633
645
|
useModalOut
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
.dt-modal{
|
|
31
|
+
overflow: hidden;
|
|
31
32
|
.ant-modal {
|
|
32
33
|
padding: 0;
|
|
33
34
|
}
|
|
@@ -38,15 +39,6 @@
|
|
|
38
39
|
|
|
39
40
|
&:not(.fullscreen-modal) {
|
|
40
41
|
.ant-modal {
|
|
41
|
-
padding: 0;
|
|
42
|
-
position: absolute;
|
|
43
|
-
left: 0;
|
|
44
|
-
top: 0;
|
|
45
|
-
right: 0;
|
|
46
|
-
bottom: 0;
|
|
47
|
-
margin: 0 auto;
|
|
48
|
-
display: flex;
|
|
49
|
-
align-items: center;
|
|
50
42
|
.ant-modal-body{
|
|
51
43
|
max-height: calc(100vh - 160px );
|
|
52
44
|
min-height: 200px;
|
|
@@ -190,13 +190,21 @@ function useSource(props) {
|
|
|
190
190
|
dataSource.value.splice(0, dataSource.value.length, ...result);
|
|
191
191
|
return;
|
|
192
192
|
}
|
|
193
|
-
const { records, total, size, current } = result;
|
|
193
|
+
const { records, total, size, current, pageDTO } = result;
|
|
194
194
|
dataSource.value.splice(0, dataSource.value.length, ...records);
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
195
|
+
if (pageDTO) {
|
|
196
|
+
pagination.value = {
|
|
197
|
+
current: pageDTO.pageNo + 1,
|
|
198
|
+
pageSize: pageDTO.pageSize || appConf?.ui?.table?.defaultPageSize,
|
|
199
|
+
total: pageDTO.totalCount
|
|
200
|
+
};
|
|
201
|
+
} else {
|
|
202
|
+
pagination.value = {
|
|
203
|
+
current,
|
|
204
|
+
pageSize: size || appConf?.ui?.table?.defaultPageSize,
|
|
205
|
+
total: 100
|
|
206
|
+
};
|
|
207
|
+
}
|
|
200
208
|
} catch (err) {
|
|
201
209
|
console.error(`\u5206\u9875\u67E5\u8BE2\u9519\u8BEF\uFF1A${err}`);
|
|
202
210
|
} finally {
|
|
@@ -300,7 +308,7 @@ function useSource(props) {
|
|
|
300
308
|
}
|
|
301
309
|
}
|
|
302
310
|
} catch (err) {
|
|
303
|
-
console.log("Err:"
|
|
311
|
+
console.log("Err:", err);
|
|
304
312
|
} finally {
|
|
305
313
|
}
|
|
306
314
|
}
|