@dt-frames/ui 1.0.10 → 1.0.13
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/src/components/dialog.d.ts +28 -18
- package/es/components/curd/src/components/props.d.ts +4 -4
- package/es/components/curd/src/types/curd.type.d.ts +3 -2
- package/es/components/forms/src/components/formIcon.d.ts +11 -6
- package/es/components/forms/src/components/formInputUseDialog.d.ts +903 -0
- package/es/components/forms/src/types/form.type.d.ts +3 -1
- package/es/components/index.d.ts +1 -1
- package/es/components/modal/src/components/modal.d.ts +2 -2
- package/es/components/modal/src/components/modalFooter.d.ts +9 -4
- package/es/components/modal/src/index.d.ts +10 -5
- package/es/components/modal/src/props.d.ts +2 -1
- package/es/components/modal/src/types/modal.type.d.ts +5 -2
- package/es/components/source/src/hooks/useFetch.d.ts +2 -2
- package/es/components/source/src/hooks/useSource.d.ts +4 -4
- package/es/components/table/src/components/TableHeader.d.ts +2 -2
- package/es/components/table/src/components/editable/CellComponent.d.ts +14 -0
- package/es/components/table/src/components/editable/EditTableCell.d.ts +88 -0
- package/es/components/table/src/components/editable/componentMap.d.ts +4 -0
- package/es/components/table/src/components/editable/index.d.ts +9 -0
- package/es/components/table/src/hooks/useCustomRow.d.ts +19 -0
- package/es/components/table/src/hooks/useTable.d.ts +2 -2
- package/es/components/table/src/index.d.ts +27 -4
- package/es/components/table/src/props.d.ts +5 -1
- package/es/components/table/src/types/table.type.d.ts +18 -2
- package/es/components/upload/index.d.ts +1 -2
- package/es/components/upload/src/helper.d.ts +1 -0
- package/es/components/upload/src/index.d.ts +40 -13
- package/es/components/upload/src/props.d.ts +4 -1
- package/es/components/upload/src/upload.d.ts +45 -10
- package/es/index.js +589 -212
- package/es/style/components/forms/index.less +23 -0
- package/es/style/components/table/index.less +6 -0
- package/es/style/components/upload/index.less +3 -11
- package/es/style/theme/header/index.less +1 -1
- package/package.json +1 -1
- package/src/components/curd/src/components/dialog.vue +7 -5
- package/src/components/curd/src/components/props.ts +4 -4
- package/src/components/curd/src/hooks/useCurd.tsx +1 -1
- package/src/components/curd/src/types/curd.type.ts +3 -2
- package/src/components/forms/index.less +23 -0
- package/src/components/forms/src/componentMap.ts +2 -0
- package/src/components/forms/src/components/formInputUseDialog.vue +43 -0
- package/src/components/forms/src/components/formItem.vue +10 -10
- package/src/components/forms/src/types/form.type.ts +6 -0
- package/src/components/index.ts +1 -2
- package/src/components/modal/src/components/modalFooter.vue +10 -2
- package/src/components/modal/src/hooks/useModal.ts +12 -4
- package/src/components/modal/src/index.vue +19 -8
- package/src/components/modal/src/props.ts +3 -2
- package/src/components/modal/src/types/modal.type.ts +5 -2
- package/src/components/source/src/hooks/useFetch.ts +6 -4
- package/src/components/source/src/hooks/useSource.ts +5 -4
- package/src/components/table/index.less +6 -0
- package/src/components/table/src/components/TableHeader.vue +2 -2
- package/src/components/table/src/components/editable/CellComponent.ts +57 -0
- package/src/components/table/src/components/editable/EditTableCell.vue +181 -0
- package/src/components/table/src/components/editable/componentMap.ts +18 -0
- package/src/components/table/src/components/editable/index.ts +58 -0
- package/src/components/table/src/hooks/useColumns.ts +15 -8
- package/src/components/table/src/hooks/useCustomRow.ts +86 -0
- package/src/components/table/src/hooks/useRowSelection.ts +1 -1
- package/src/components/table/src/hooks/useTable.ts +1 -1
- package/src/components/table/src/hooks/useTableHeader.ts +1 -1
- package/src/components/table/src/index.vue +20 -3
- package/src/components/table/src/props.ts +4 -1
- package/src/components/table/src/types/table.type.ts +30 -3
- package/src/components/upload/index.less +3 -11
- package/src/components/upload/index.ts +0 -2
- package/src/components/upload/src/helper.ts +29 -1
- package/src/components/upload/src/props.ts +4 -1
- package/src/components/upload/src/upload.vue +88 -63
- package/src/theme/header/index.less +1 -1
- package/src/components/upload/src/index.vue +0 -38
|
@@ -12,7 +12,7 @@ export declare type FormCallBackParams = {
|
|
|
12
12
|
model: Recordable;
|
|
13
13
|
name: string;
|
|
14
14
|
};
|
|
15
|
-
export declare type ComponentType = 'Input' | 'InputGroup' | 'InputPassword' | 'InputSearch' | 'InputTextArea' | 'InputNumber' | 'InputCountDown' | 'Select' | 'TreeSelect' | 'ApiTree' | 'ApiTreeSelect' | 'Radio' | 'RadioButtonGroup' | 'RadioGroup' | 'Checkbox' | 'CheckboxGroup' | 'AutoComplete' | 'Cascader' | 'DatePicker' | 'MonthPicker' | 'RangePicker' | 'WeekPicker' | 'TimePicker' | 'Switch' | 'Upload' | 'IconPicker' | 'Render' | 'Slider' | 'Rate' | 'Divider' | 'Icon';
|
|
15
|
+
export declare type ComponentType = 'Input' | 'InputWithDialog' | 'InputGroup' | 'InputPassword' | 'InputSearch' | 'InputTextArea' | 'InputNumber' | 'InputCountDown' | 'Select' | 'TreeSelect' | 'ApiTree' | 'ApiTreeSelect' | 'Radio' | 'RadioButtonGroup' | 'RadioGroup' | 'Checkbox' | 'CheckboxGroup' | 'AutoComplete' | 'Cascader' | 'DatePicker' | 'MonthPicker' | 'RangePicker' | 'WeekPicker' | 'TimePicker' | 'Switch' | 'Upload' | 'IconPicker' | 'Render' | 'Slider' | 'Rate' | 'Divider' | 'Icon';
|
|
16
16
|
export declare type ColEx = {
|
|
17
17
|
style?: any;
|
|
18
18
|
span?: number | string;
|
|
@@ -102,6 +102,8 @@ export declare type FormSchema = {
|
|
|
102
102
|
labelCol?: Partial<ColEx>;
|
|
103
103
|
wrapperCol?: Partial<ColEx>;
|
|
104
104
|
isAdvanced?: boolean;
|
|
105
|
+
openDialog?: (parms: Recordable) => void;
|
|
106
|
+
linkProps?: string[];
|
|
105
107
|
};
|
|
106
108
|
export declare type FormActionType = {
|
|
107
109
|
setProps: (props: FormProps) => Promise<void>;
|
package/es/components/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { useSource } from './source';
|
|
|
8
8
|
import { useCurd } from './curd';
|
|
9
9
|
import { export2Excel } from './excel';
|
|
10
10
|
import { DtIframe } from './iframe';
|
|
11
|
-
import { DtUpload
|
|
11
|
+
import { DtUpload } from './upload';
|
|
12
12
|
import { DtTree } from './tree';
|
|
13
13
|
export declare function initComponents(): {
|
|
14
14
|
install(app: App): void;
|
|
@@ -80,7 +80,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
80
80
|
default: boolean;
|
|
81
81
|
};
|
|
82
82
|
maskStyle: import("vue").PropType<import("vue").CSSProperties>;
|
|
83
|
-
footer: import("vue").PropType<import("vue").VNodeChild | JSX.Element>;
|
|
83
|
+
footer: import("vue").PropType<import("vue").VNodeChild | JSX.Element | import("../../../forms").ButtonProps[]>;
|
|
84
84
|
bodyStyle: import("vue").PropType<import("vue").CSSProperties>;
|
|
85
85
|
wrapperProps: ObjectConstructor;
|
|
86
86
|
afterClose: FunctionConstructor;
|
|
@@ -167,7 +167,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
167
167
|
default: boolean;
|
|
168
168
|
};
|
|
169
169
|
maskStyle: import("vue").PropType<import("vue").CSSProperties>;
|
|
170
|
-
footer: import("vue").PropType<import("vue").VNodeChild | JSX.Element>;
|
|
170
|
+
footer: import("vue").PropType<import("vue").VNodeChild | JSX.Element | import("../../../forms").ButtonProps[]>;
|
|
171
171
|
bodyStyle: import("vue").PropType<import("vue").CSSProperties>;
|
|
172
172
|
wrapperProps: ObjectConstructor;
|
|
173
173
|
afterClose: FunctionConstructor;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
1
2
|
import { ButtonProps } from '../../../forms';
|
|
2
3
|
declare const _sfc_main: import("vue").DefineComponent<{
|
|
4
|
+
buttons: PropType<ButtonProps[]>;
|
|
3
5
|
showSave: {
|
|
4
6
|
type: BooleanConstructor;
|
|
5
7
|
default: boolean;
|
|
@@ -7,6 +9,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
7
9
|
}, {
|
|
8
10
|
emits: (event: "handleSave" | "handleCancel", ...args: any[]) => void;
|
|
9
11
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
12
|
+
buttons: PropType<ButtonProps[]>;
|
|
10
13
|
showSave: {
|
|
11
14
|
type: BooleanConstructor;
|
|
12
15
|
default: boolean;
|
|
@@ -16,10 +19,11 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
16
19
|
onHandleCancel?: (...args: any[]) => any;
|
|
17
20
|
}>>;
|
|
18
21
|
buttonActions: ButtonProps[];
|
|
22
|
+
buttonList: import("vue").ComputedRef<ButtonProps[]>;
|
|
19
23
|
handleMethod: (item: ButtonProps) => void;
|
|
20
24
|
FormButtons: import("vue").DefineComponent<{
|
|
21
25
|
mode: {
|
|
22
|
-
type:
|
|
26
|
+
type: PropType<"search" | "dialog">;
|
|
23
27
|
default: string;
|
|
24
28
|
};
|
|
25
29
|
show: {
|
|
@@ -35,7 +39,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
35
39
|
default: number;
|
|
36
40
|
};
|
|
37
41
|
buttonList: {
|
|
38
|
-
type:
|
|
42
|
+
type: PropType<ButtonProps[]>;
|
|
39
43
|
default: any[];
|
|
40
44
|
};
|
|
41
45
|
isAdvanced: {
|
|
@@ -57,7 +61,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
57
61
|
handleBtnClick: (button: ButtonProps) => void;
|
|
58
62
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
59
63
|
mode: {
|
|
60
|
-
type:
|
|
64
|
+
type: PropType<"search" | "dialog">;
|
|
61
65
|
default: string;
|
|
62
66
|
};
|
|
63
67
|
show: {
|
|
@@ -73,7 +77,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
73
77
|
default: number;
|
|
74
78
|
};
|
|
75
79
|
buttonList: {
|
|
76
|
-
type:
|
|
80
|
+
type: PropType<ButtonProps[]>;
|
|
77
81
|
default: any[];
|
|
78
82
|
};
|
|
79
83
|
isAdvanced: {
|
|
@@ -89,6 +93,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
89
93
|
isAdvanced: boolean;
|
|
90
94
|
}>;
|
|
91
95
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("handleSave" | "handleCancel")[], "handleSave" | "handleCancel", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
96
|
+
buttons: PropType<ButtonProps[]>;
|
|
92
97
|
showSave: {
|
|
93
98
|
type: BooleanConstructor;
|
|
94
99
|
default: boolean;
|
|
@@ -82,7 +82,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
82
82
|
default: boolean;
|
|
83
83
|
};
|
|
84
84
|
maskStyle: import("vue").PropType<import("vue").CSSProperties>;
|
|
85
|
-
footer: import("vue").PropType<import("vue").VNodeChild | JSX.Element>;
|
|
85
|
+
footer: import("vue").PropType<import("vue").VNodeChild | JSX.Element | import("../../forms").ButtonProps[]>;
|
|
86
86
|
bodyStyle: import("vue").PropType<import("vue").CSSProperties>;
|
|
87
87
|
wrapperProps: ObjectConstructor;
|
|
88
88
|
afterClose: FunctionConstructor;
|
|
@@ -174,7 +174,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
174
174
|
default: boolean;
|
|
175
175
|
};
|
|
176
176
|
maskStyle: import("vue").PropType<import("vue").CSSProperties>;
|
|
177
|
-
footer: import("vue").PropType<import("vue").VNodeChild | JSX.Element>;
|
|
177
|
+
footer: import("vue").PropType<import("vue").VNodeChild | JSX.Element | import("../../forms").ButtonProps[]>;
|
|
178
178
|
bodyStyle: import("vue").PropType<import("vue").CSSProperties>;
|
|
179
179
|
wrapperProps: ObjectConstructor;
|
|
180
180
|
afterClose: FunctionConstructor;
|
|
@@ -188,6 +188,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
188
188
|
onRegister?: (...args: any[]) => any;
|
|
189
189
|
}>>;
|
|
190
190
|
emits: (event: "visible-change" | "height-change" | "cancel" | "save" | "register" | "update:visible", ...args: any[]) => void;
|
|
191
|
+
modalFooterHeight: import("vue").ComputedRef<number>;
|
|
191
192
|
modalMethods: ModalMethods;
|
|
192
193
|
getWrapClassName: import("vue").ComputedRef<string>;
|
|
193
194
|
toggleFullScreen: (e: Event) => void;
|
|
@@ -283,7 +284,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
283
284
|
default: boolean;
|
|
284
285
|
};
|
|
285
286
|
maskStyle: import("vue").PropType<import("vue").CSSProperties>;
|
|
286
|
-
footer: import("vue").PropType<import("vue").VNodeChild | JSX.Element>;
|
|
287
|
+
footer: import("vue").PropType<import("vue").VNodeChild | JSX.Element | import("../../forms").ButtonProps[]>;
|
|
287
288
|
bodyStyle: import("vue").PropType<import("vue").CSSProperties>;
|
|
288
289
|
wrapperProps: ObjectConstructor;
|
|
289
290
|
afterClose: FunctionConstructor;
|
|
@@ -370,7 +371,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
370
371
|
default: boolean;
|
|
371
372
|
};
|
|
372
373
|
maskStyle: import("vue").PropType<import("vue").CSSProperties>;
|
|
373
|
-
footer: import("vue").PropType<import("vue").VNodeChild | JSX.Element>;
|
|
374
|
+
footer: import("vue").PropType<import("vue").VNodeChild | JSX.Element | import("../../forms").ButtonProps[]>;
|
|
374
375
|
bodyStyle: import("vue").PropType<import("vue").CSSProperties>;
|
|
375
376
|
wrapperProps: ObjectConstructor;
|
|
376
377
|
afterClose: FunctionConstructor;
|
|
@@ -632,6 +633,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
632
633
|
fullScreen: boolean;
|
|
633
634
|
}>;
|
|
634
635
|
ModalFooter: import("vue").DefineComponent<{
|
|
636
|
+
buttons: import("vue").PropType<import("../../forms").ButtonProps[]>;
|
|
635
637
|
showSave: {
|
|
636
638
|
type: BooleanConstructor;
|
|
637
639
|
default: boolean;
|
|
@@ -639,6 +641,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
639
641
|
}, {
|
|
640
642
|
emits: (event: "handleSave" | "handleCancel", ...args: any[]) => void;
|
|
641
643
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
644
|
+
buttons: import("vue").PropType<import("../../forms").ButtonProps[]>;
|
|
642
645
|
showSave: {
|
|
643
646
|
type: BooleanConstructor;
|
|
644
647
|
default: boolean;
|
|
@@ -648,6 +651,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
648
651
|
onHandleCancel?: (...args: any[]) => any;
|
|
649
652
|
}>>;
|
|
650
653
|
buttonActions: import("../../forms").ButtonProps[];
|
|
654
|
+
buttonList: import("vue").ComputedRef<import("../../forms").ButtonProps[]>;
|
|
651
655
|
handleMethod: (item: import("../../forms").ButtonProps) => void;
|
|
652
656
|
FormButtons: import("vue").DefineComponent<{
|
|
653
657
|
mode: {
|
|
@@ -721,6 +725,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
721
725
|
isAdvanced: boolean;
|
|
722
726
|
}>;
|
|
723
727
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("handleSave" | "handleCancel")[], "handleSave" | "handleCancel", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
728
|
+
buttons: import("vue").PropType<import("../../forms").ButtonProps[]>;
|
|
724
729
|
showSave: {
|
|
725
730
|
type: BooleanConstructor;
|
|
726
731
|
default: boolean;
|
|
@@ -1113,7 +1118,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
1113
1118
|
default: boolean;
|
|
1114
1119
|
};
|
|
1115
1120
|
maskStyle: import("vue").PropType<import("vue").CSSProperties>;
|
|
1116
|
-
footer: import("vue").PropType<import("vue").VNodeChild | JSX.Element>;
|
|
1121
|
+
footer: import("vue").PropType<import("vue").VNodeChild | JSX.Element | import("../../forms").ButtonProps[]>;
|
|
1117
1122
|
bodyStyle: import("vue").PropType<import("vue").CSSProperties>;
|
|
1118
1123
|
wrapperProps: ObjectConstructor;
|
|
1119
1124
|
afterClose: FunctionConstructor;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CSSProperties, PropType, VNodeChild } from "vue";
|
|
2
|
+
import { ButtonProps } from "../../forms";
|
|
2
3
|
export declare const basicProps: {
|
|
3
4
|
visible: {
|
|
4
5
|
type: BooleanConstructor;
|
|
@@ -81,7 +82,7 @@ export declare const basicProps: {
|
|
|
81
82
|
default: boolean;
|
|
82
83
|
};
|
|
83
84
|
maskStyle: PropType<CSSProperties>;
|
|
84
|
-
footer: PropType<VNodeChild | JSX.Element>;
|
|
85
|
+
footer: PropType<VNodeChild | JSX.Element | ButtonProps[]>;
|
|
85
86
|
bodyStyle: PropType<CSSProperties>;
|
|
86
87
|
wrapperProps: ObjectConstructor;
|
|
87
88
|
afterClose: FunctionConstructor;
|
|
@@ -6,13 +6,16 @@ export declare type ModalMethods = {
|
|
|
6
6
|
redoModalHeight?: () => void;
|
|
7
7
|
};
|
|
8
8
|
export interface ReturnMethods extends ModalMethods {
|
|
9
|
-
openModal:
|
|
9
|
+
openModal: (data?: {
|
|
10
|
+
data?: Recordable;
|
|
11
|
+
afterClose?: (data: Recordable) => void;
|
|
12
|
+
}, openOnSet?: boolean) => void;
|
|
10
13
|
closeModal: () => void;
|
|
11
14
|
getVisible?: ComputedRef<boolean>;
|
|
12
15
|
}
|
|
13
16
|
export interface ReturnInnerMethods extends ModalMethods {
|
|
14
17
|
openModal: <T = any>(props?: boolean, data?: T, openOnSet?: boolean) => void;
|
|
15
|
-
closeModal: (rsp
|
|
18
|
+
closeModal: (rsp?: Recordable) => void;
|
|
16
19
|
changeLoading: (loading: boolean) => void;
|
|
17
20
|
getVisible?: ComputedRef<boolean>;
|
|
18
21
|
redoModalHeight: () => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ApiType } from "@dt-frames/core";
|
|
2
2
|
export declare function useFetch(api: string | ApiType, baseUrl?: string): {
|
|
3
|
-
fetch: (params
|
|
3
|
+
fetch: (params: any) => Promise<unknown>;
|
|
4
4
|
};
|
|
@@ -25,18 +25,18 @@ export declare function useSource(opt: SourceType): {
|
|
|
25
25
|
loading: Ref<boolean>;
|
|
26
26
|
};
|
|
27
27
|
curd: {
|
|
28
|
-
onAdd: (model: Recordable) => void
|
|
28
|
+
onAdd: (model: Recordable) => Promise<void>;
|
|
29
29
|
onQueryById: (id: string) => Promise<unknown>;
|
|
30
|
-
onUpdate: (model: Recordable) => void
|
|
30
|
+
onUpdate: (model: Recordable) => Promise<void>;
|
|
31
31
|
onDeletes: (ids: any) => void;
|
|
32
32
|
};
|
|
33
33
|
loading: {
|
|
34
34
|
[key: string]: Ref<boolean>;
|
|
35
35
|
};
|
|
36
|
-
onAdd: (model: Recordable) => void
|
|
36
|
+
onAdd: (model: Recordable) => Promise<void>;
|
|
37
37
|
onQueryById: (id: string) => Promise<unknown>;
|
|
38
38
|
onDeletes: (ids: any) => void;
|
|
39
|
-
onUpdate: (model: Recordable) => void
|
|
39
|
+
onUpdate: (model: Recordable) => Promise<void>;
|
|
40
40
|
onTableChange: (params: TableParamsType, needSearch?: boolean) => void;
|
|
41
41
|
onDownload: (excelData: DownloadType) => void;
|
|
42
42
|
onSearch: (model?: Recordable) => void;
|
|
@@ -2,7 +2,7 @@ import { PropType } from "vue";
|
|
|
2
2
|
import type { BtnsType, ColumnChangeParam, TableSetting } from "../types/table.type";
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
tableTools: {
|
|
5
|
-
type: PropType<TableSetting>;
|
|
5
|
+
type: PropType<boolean | TableSetting>;
|
|
6
6
|
};
|
|
7
7
|
toolbar: {
|
|
8
8
|
type: PropType<BtnsType[]>;
|
|
@@ -14,7 +14,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
14
14
|
handleMethod: (e: any) => void;
|
|
15
15
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "columns-change"[], "columns-change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
16
|
tableTools: {
|
|
17
|
-
type: PropType<TableSetting>;
|
|
17
|
+
type: PropType<boolean | TableSetting>;
|
|
18
18
|
};
|
|
19
19
|
toolbar: {
|
|
20
20
|
type: PropType<BtnsType[]>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Recordable } from "@dt-frames/core";
|
|
2
|
+
import { FunctionalComponent, Ref } from "vue";
|
|
3
|
+
export declare type EditRecordRow<T = Recordable> = Partial<{
|
|
4
|
+
onEdit: (editable: boolean, submit?: boolean) => Promise<boolean>;
|
|
5
|
+
onValid: () => Promise<boolean>;
|
|
6
|
+
editable: boolean;
|
|
7
|
+
onCancel: Function;
|
|
8
|
+
onSubmit: Function;
|
|
9
|
+
submitCbs: Function[];
|
|
10
|
+
cancelCbs: Function[];
|
|
11
|
+
validCbs: Function[];
|
|
12
|
+
editValueRefs: Recordable<Ref>;
|
|
13
|
+
} & T>;
|
|
14
|
+
export declare const CellComponent: FunctionalComponent;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { Recordable } from "@dt-frames/core";
|
|
2
|
+
import { PropType } from "vue";
|
|
3
|
+
import { BasicColumn, LableValOptions } from "../../types/table.type";
|
|
4
|
+
declare const _default: import("vue").DefineComponent<{
|
|
5
|
+
value: {
|
|
6
|
+
type: PropType<string | number | boolean | Recordable<any>>;
|
|
7
|
+
default: string;
|
|
8
|
+
};
|
|
9
|
+
record: {
|
|
10
|
+
type: PropType<Partial<{
|
|
11
|
+
onEdit: (editable: boolean, submit?: boolean) => Promise<boolean>;
|
|
12
|
+
onValid: () => Promise<boolean>;
|
|
13
|
+
editable: boolean;
|
|
14
|
+
onCancel: Function;
|
|
15
|
+
onSubmit: Function;
|
|
16
|
+
submitCbs: Function[];
|
|
17
|
+
cancelCbs: Function[];
|
|
18
|
+
validCbs: Function[];
|
|
19
|
+
editValueRefs: Recordable<import("vue").Ref<any>>;
|
|
20
|
+
} & Recordable<any>>>;
|
|
21
|
+
};
|
|
22
|
+
column: {
|
|
23
|
+
type: PropType<BasicColumn>;
|
|
24
|
+
default: () => BasicColumn;
|
|
25
|
+
};
|
|
26
|
+
index: NumberConstructor;
|
|
27
|
+
}, {
|
|
28
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
29
|
+
value: {
|
|
30
|
+
type: PropType<string | number | boolean | Recordable<any>>;
|
|
31
|
+
default: string;
|
|
32
|
+
};
|
|
33
|
+
record: {
|
|
34
|
+
type: PropType<Partial<{
|
|
35
|
+
onEdit: (editable: boolean, submit?: boolean) => Promise<boolean>;
|
|
36
|
+
onValid: () => Promise<boolean>;
|
|
37
|
+
editable: boolean;
|
|
38
|
+
onCancel: Function;
|
|
39
|
+
onSubmit: Function;
|
|
40
|
+
submitCbs: Function[];
|
|
41
|
+
cancelCbs: Function[];
|
|
42
|
+
validCbs: Function[];
|
|
43
|
+
editValueRefs: Recordable<import("vue").Ref<any>>;
|
|
44
|
+
} & Recordable<any>>>;
|
|
45
|
+
};
|
|
46
|
+
column: {
|
|
47
|
+
type: PropType<BasicColumn>;
|
|
48
|
+
default: () => BasicColumn;
|
|
49
|
+
};
|
|
50
|
+
index: NumberConstructor;
|
|
51
|
+
}>> & {
|
|
52
|
+
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any);
|
|
53
|
+
}>>;
|
|
54
|
+
getComponentProps: import("vue").ComputedRef<any>;
|
|
55
|
+
getRuleVisible: import("vue").ComputedRef<boolean>;
|
|
56
|
+
editRule: boolean | ((text: string, record: Recordable<any>) => Promise<string>);
|
|
57
|
+
ruleMessage: import("vue").Ref<string>;
|
|
58
|
+
getWrapperClass: import("vue").ComputedRef<string>;
|
|
59
|
+
handleChange: (e: any) => Promise<void>;
|
|
60
|
+
handleOptionsChange: (options: LableValOptions) => void;
|
|
61
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
62
|
+
value: {
|
|
63
|
+
type: PropType<string | number | boolean | Recordable<any>>;
|
|
64
|
+
default: string;
|
|
65
|
+
};
|
|
66
|
+
record: {
|
|
67
|
+
type: PropType<Partial<{
|
|
68
|
+
onEdit: (editable: boolean, submit?: boolean) => Promise<boolean>;
|
|
69
|
+
onValid: () => Promise<boolean>;
|
|
70
|
+
editable: boolean;
|
|
71
|
+
onCancel: Function;
|
|
72
|
+
onSubmit: Function;
|
|
73
|
+
submitCbs: Function[];
|
|
74
|
+
cancelCbs: Function[];
|
|
75
|
+
validCbs: Function[];
|
|
76
|
+
editValueRefs: Recordable<import("vue").Ref<any>>;
|
|
77
|
+
} & Recordable<any>>>;
|
|
78
|
+
};
|
|
79
|
+
column: {
|
|
80
|
+
type: PropType<BasicColumn>;
|
|
81
|
+
default: () => BasicColumn;
|
|
82
|
+
};
|
|
83
|
+
index: NumberConstructor;
|
|
84
|
+
}>>, {
|
|
85
|
+
value: string;
|
|
86
|
+
column: BasicColumn;
|
|
87
|
+
}>;
|
|
88
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BasicColumn } from "../../types/table.type";
|
|
2
|
+
declare function renderEditCell(column: BasicColumn): ({ text: value, record, index }: {
|
|
3
|
+
text: any;
|
|
4
|
+
record: any;
|
|
5
|
+
index: any;
|
|
6
|
+
}) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
}>;
|
|
9
|
+
export { renderEditCell };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Recordable } from "@dt-frames/core";
|
|
2
|
+
import { ComputedRef } from "vue";
|
|
3
|
+
import { BasicTableProps } from "../types/table.type";
|
|
4
|
+
interface Options {
|
|
5
|
+
setSelectedRowKeys: (keys: string[]) => void;
|
|
6
|
+
getSelectRowKeys: () => string[];
|
|
7
|
+
clearSelectedRowKeys: () => void;
|
|
8
|
+
emit: any;
|
|
9
|
+
}
|
|
10
|
+
export declare function useCustomRow(propsRef: ComputedRef<BasicTableProps>, { setSelectedRowKeys, getSelectRowKeys, clearSelectedRowKeys, emit }: Options): {
|
|
11
|
+
customRow: (record: Recordable, index: number) => {
|
|
12
|
+
onClick: (e: any) => void;
|
|
13
|
+
onDblclick: (event: Event) => void;
|
|
14
|
+
onContextmenu: (event: Event) => void;
|
|
15
|
+
onMouseenter: (event: Event) => void;
|
|
16
|
+
onMouseleave: (event: Event) => void;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DynamicProps } from '@dt-frames/core';
|
|
2
|
-
import { BasicTableProps } from '../types/table.type';
|
|
2
|
+
import { BasicTableProps, TableActionType } from '../types/table.type';
|
|
3
3
|
declare type Props = Partial<DynamicProps<BasicTableProps>>;
|
|
4
|
-
export declare function useTable(tableProps?: Props): any
|
|
4
|
+
export declare function useTable(tableProps?: Props): [registerTable: (...args: any) => void, methods: TableActionType];
|
|
5
5
|
export {};
|
|
@@ -7,9 +7,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7
7
|
default: boolean;
|
|
8
8
|
};
|
|
9
9
|
tableSetting: {
|
|
10
|
-
type: import("vue").PropType<import("./types/table.type").TableSetting>;
|
|
10
|
+
type: import("vue").PropType<boolean | import("./types/table.type").TableSetting>;
|
|
11
11
|
default: () => {};
|
|
12
12
|
};
|
|
13
|
+
clickToRowSelect: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
13
17
|
striped: {
|
|
14
18
|
type: BooleanConstructor;
|
|
15
19
|
default: boolean;
|
|
@@ -264,13 +268,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
264
268
|
rowKey: string;
|
|
265
269
|
columns: import("./types/table.type").BasicColumn[];
|
|
266
270
|
tableLayout: string;
|
|
271
|
+
customRow: (record: Recordable<any>, index: number) => {
|
|
272
|
+
onClick: (e: any) => void;
|
|
273
|
+
onDblclick: (event: Event) => void;
|
|
274
|
+
onContextmenu: (event: Event) => void;
|
|
275
|
+
onMouseenter: (event: Event) => void;
|
|
276
|
+
onMouseleave: (event: Event) => void;
|
|
277
|
+
};
|
|
267
278
|
size: SizeType;
|
|
268
279
|
bordered: boolean;
|
|
269
280
|
onDownload: Function;
|
|
270
|
-
customRow: (record: any, index: any) => void;
|
|
271
281
|
childrenColumnName: string;
|
|
272
282
|
clickRowSelect: boolean;
|
|
273
283
|
tableSetting: {};
|
|
284
|
+
clickToRowSelect: boolean;
|
|
274
285
|
striped: boolean;
|
|
275
286
|
canColDrag: boolean;
|
|
276
287
|
resizable: boolean;
|
|
@@ -352,15 +363,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
352
363
|
}>>, filters: Partial<Recordable<string[]>>, sorter: import("./types/table.type").SorterResult) => any;
|
|
353
364
|
getSelectRows: () => Recordable<any>[];
|
|
354
365
|
handleResizeColumn: (w: any, col: any) => void;
|
|
355
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("register" | "columns-change" | "selection-change")[], "register" | "columns-change" | "selection-change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
366
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("register" | "columns-change" | "selection-change" | "row-click" | "row-dbClick" | "row-contextmenu" | "row-mouseenter" | "row-mouseleave" | "expanded-rows-change" | "edit-change")[], "register" | "columns-change" | "selection-change" | "row-click" | "row-dbClick" | "row-contextmenu" | "row-mouseenter" | "row-mouseleave" | "expanded-rows-change" | "edit-change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
356
367
|
clickRowSelect: {
|
|
357
368
|
type: BooleanConstructor;
|
|
358
369
|
default: boolean;
|
|
359
370
|
};
|
|
360
371
|
tableSetting: {
|
|
361
|
-
type: import("vue").PropType<import("./types/table.type").TableSetting>;
|
|
372
|
+
type: import("vue").PropType<boolean | import("./types/table.type").TableSetting>;
|
|
362
373
|
default: () => {};
|
|
363
374
|
};
|
|
375
|
+
clickToRowSelect: {
|
|
376
|
+
type: BooleanConstructor;
|
|
377
|
+
default: boolean;
|
|
378
|
+
};
|
|
364
379
|
striped: {
|
|
365
380
|
type: BooleanConstructor;
|
|
366
381
|
default: boolean;
|
|
@@ -548,6 +563,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
548
563
|
onRegister?: (...args: any[]) => any;
|
|
549
564
|
"onColumns-change"?: (...args: any[]) => any;
|
|
550
565
|
"onSelection-change"?: (...args: any[]) => any;
|
|
566
|
+
"onRow-click"?: (...args: any[]) => any;
|
|
567
|
+
"onRow-dbClick"?: (...args: any[]) => any;
|
|
568
|
+
"onRow-contextmenu"?: (...args: any[]) => any;
|
|
569
|
+
"onRow-mouseenter"?: (...args: any[]) => any;
|
|
570
|
+
"onRow-mouseleave"?: (...args: any[]) => any;
|
|
571
|
+
"onExpanded-rows-change"?: (...args: any[]) => any;
|
|
572
|
+
"onEdit-change"?: (...args: any[]) => any;
|
|
551
573
|
}, {
|
|
552
574
|
size: SizeType;
|
|
553
575
|
loading: boolean;
|
|
@@ -563,6 +585,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
563
585
|
rowSelection: any;
|
|
564
586
|
clickRowSelect: boolean;
|
|
565
587
|
tableSetting: {};
|
|
588
|
+
clickToRowSelect: boolean;
|
|
566
589
|
striped: boolean;
|
|
567
590
|
canColDrag: boolean;
|
|
568
591
|
resizable: boolean;
|
|
@@ -10,9 +10,13 @@ export declare const TableProps: {
|
|
|
10
10
|
default: boolean;
|
|
11
11
|
};
|
|
12
12
|
tableSetting: {
|
|
13
|
-
type: PropType<TableSetting>;
|
|
13
|
+
type: PropType<boolean | TableSetting>;
|
|
14
14
|
default: () => {};
|
|
15
15
|
};
|
|
16
|
+
clickToRowSelect: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
16
20
|
striped: {
|
|
17
21
|
type: BooleanConstructor;
|
|
18
22
|
default: boolean;
|
|
@@ -64,6 +64,12 @@ export declare type ActionType = {
|
|
|
64
64
|
fixed?: 'left' | 'right' | 'auto';
|
|
65
65
|
btns?: BtnsType[];
|
|
66
66
|
};
|
|
67
|
+
export declare type ComponentType = 'Input' | 'InputNumber' | 'Select' | 'TreeSelect' | 'Checkbox' | 'Switch' | 'DatePicker' | 'TimePicker';
|
|
68
|
+
export declare type LableValOptions = {
|
|
69
|
+
label: string;
|
|
70
|
+
value: any;
|
|
71
|
+
[key: string]: string | number | boolean;
|
|
72
|
+
}[];
|
|
67
73
|
export interface BasicColumn extends ColumnProps {
|
|
68
74
|
children?: BasicColumn[];
|
|
69
75
|
defaultHidden?: boolean;
|
|
@@ -72,6 +78,15 @@ export interface BasicColumn extends ColumnProps {
|
|
|
72
78
|
render?: CellFormat;
|
|
73
79
|
edit?: boolean;
|
|
74
80
|
editRow?: boolean;
|
|
81
|
+
editable?: boolean;
|
|
82
|
+
editComponent?: ComponentType;
|
|
83
|
+
editComponentProps?: ((opt: {
|
|
84
|
+
text: string | number | boolean | Recordable;
|
|
85
|
+
record: Recordable;
|
|
86
|
+
column: BasicColumn;
|
|
87
|
+
index: number;
|
|
88
|
+
}) => Recordable) | Recordable;
|
|
89
|
+
editRule?: boolean | ((text: string, record: Recordable) => Promise<string>);
|
|
75
90
|
showIndexColumn?: boolean;
|
|
76
91
|
expand?: boolean;
|
|
77
92
|
}
|
|
@@ -84,6 +99,7 @@ export declare type TableActionType = {
|
|
|
84
99
|
getRowSelection: () => TableRowSelection<Recordable>;
|
|
85
100
|
getCacheColumns: () => BasicColumn[];
|
|
86
101
|
setCacheColumnsByField?: (dataIndex: string | undefined, value: BasicColumn) => void;
|
|
87
|
-
getSelectRows: () =>
|
|
88
|
-
getSelectRowKeys: () =>
|
|
102
|
+
getSelectRows: () => Recordable[];
|
|
103
|
+
getSelectRowKeys: () => string[];
|
|
104
|
+
emit?: any;
|
|
89
105
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Ref } from "vue";
|
|
2
2
|
export declare function useHelpers(acceptRef: Ref<string[]>, helpTextRef: Ref<string>, maxNumberRef: Ref<number>, maxSizeRef: Ref<number>): {
|
|
3
3
|
getStringAccept: import("vue").ComputedRef<string>;
|
|
4
|
+
getHelpText: import("vue").ComputedRef<string>;
|
|
4
5
|
};
|