@dt-frames/ui 2.0.2 → 2.0.4
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/assets/locales/en.ts +1 -1
- package/es/components/container/index.d.ts +4 -3
- package/es/components/container/index.js +24 -22
- package/es/components/container/src/slot-container.d.ts +5 -3
- package/es/components/curd/index.js +261 -229
- package/es/components/curd/src/components/Curd.d.ts +126 -331
- package/es/components/curd/src/props.d.ts +14 -15
- package/es/components/drawer/index.d.ts +3 -5
- package/es/components/drawer/index.js +55 -54
- package/es/components/drawer/src/components/DrawerHeader.d.ts +1 -3
- package/es/components/drawer/src/index.d.ts +4 -7
- package/es/components/form/index.d.ts +213 -361
- package/es/components/form/index.js +210 -163
- package/es/components/form/index.less +206 -8
- package/es/components/form/src/components/FormButtons.d.ts +3 -3
- package/es/components/form/src/components/FormItem.d.ts +152 -304
- package/es/components/form/src/components/formIcon.d.ts +4 -4
- package/es/components/form/src/components/formInputUseDialog.d.ts +3 -3
- package/es/components/form/src/enums/index.d.ts +1 -1
- package/es/components/form/src/index.d.ts +199 -347
- package/es/components/form/src/props.d.ts +8 -12
- package/es/components/form/src/types/form.type.d.ts +2 -2
- package/es/components/icons/index.d.ts +496 -2
- package/es/components/icons/index.less +5 -0
- package/es/components/icons/src/pick-icon.d.ts +5 -5
- package/es/components/modal/index.js +76 -74
- package/es/components/modal/index.less +10 -0
- package/es/components/modal/src/components/Modal.d.ts +108 -215
- package/es/components/modal/src/components/ModalFooter.d.ts +3 -3
- package/es/components/modal/src/index.d.ts +116 -223
- package/es/components/source/hooks/useSource.d.ts +14 -0
- package/es/components/source/index.js +66 -27
- package/es/components/source/types/source.type.d.ts +4 -8
- package/es/components/table/index.js +452 -820
- package/es/components/table/index.less +50 -14
- package/es/components/table/src/components/TableAction.d.ts +1 -1
- package/es/components/table/src/components/TableHeader.d.ts +109 -216
- package/es/components/table/src/components/TableRender.d.ts +13 -9
- package/es/components/table/src/components/tableSetting/Download.d.ts +107 -214
- package/es/components/table/src/components/tableSetting/DownloadCtrl.d.ts +107 -214
- package/es/components/table/src/components/tableSetting/index.d.ts +107 -214
- package/es/components/table/src/hooks/useDataSource.d.ts +1 -2
- package/es/components/table/src/hooks/usePagination.d.ts +3 -118
- package/es/components/table/src/index.d.ts +99 -435
- package/es/components/table/src/props.d.ts +19 -74
- package/es/components/table/src/types/actions.type.d.ts +1 -2
- package/es/components/table/src/types/table.type.d.ts +13 -8
- package/es/index.d.ts +1 -1
- package/es/index.js +2 -3240
- package/es/theme/index.js +688 -453
- package/es/theme/index.less +150 -0
- package/es/theme/src/components/header/components/logo.d.ts +0 -1
- package/es/theme/src/components/header/components/notify.d.ts +4 -3
- package/es/theme/src/components/header/components/setting-theme.d.ts +2 -1
- package/es/theme/src/components/header/components/user-info.d.ts +4 -3
- package/es/theme/src/components/header/helper/menu-tree.d.ts +1 -0
- package/es/theme/src/components/header/index.d.ts +8 -7
- package/es/theme/src/components/header/multiple-header.d.ts +22 -25
- package/es/theme/src/components/sider/components/drag-bar.d.ts +1 -1
- package/es/theme/src/components/sider/components/sider-trigger.d.ts +0 -1
- package/es/theme/src/components/sider/index.d.ts +147 -3
- package/es/theme/src/components/sider/mix-sider.d.ts +146 -0
- package/es/theme/src/enums/theme.enum.d.ts +2 -1
- package/es/theme/src/hooks/useMenu.d.ts +4 -2
- package/es/theme/src/index.d.ts +166 -23
- package/es/theme/src/stores/theme.store.d.ts +3 -0
- package/es/theme/src/types/theme.type.d.ts +2 -1
- package/package.json +3 -4
- package/vite.config.ts +0 -27
|
@@ -3,9 +3,13 @@ import { TableRowSelection } from "ant-design-vue/lib/table/interface";
|
|
|
3
3
|
import { PropType } from "vue";
|
|
4
4
|
import { TableActionType } from "./types/actions.type";
|
|
5
5
|
import { DownloadType } from "./types/header.type";
|
|
6
|
-
import { BasicColumn, ButtonType, TableRowAction, TableSetting } from "./types/table.type";
|
|
6
|
+
import { BasicColumn, ButtonType, TableRowAction, TableSetting, PaginationProps } from "./types/table.type";
|
|
7
7
|
export declare const DEFAULT_SORT_FN: (sortInfo: any) => Recordable;
|
|
8
8
|
export declare const TableProps: {
|
|
9
|
+
autoFetch: {
|
|
10
|
+
type: BooleanConstructor;
|
|
11
|
+
default: boolean;
|
|
12
|
+
};
|
|
9
13
|
clickToSelectRow: {
|
|
10
14
|
type: BooleanConstructor;
|
|
11
15
|
default: boolean;
|
|
@@ -18,10 +22,6 @@ export declare const TableProps: {
|
|
|
18
22
|
type: BooleanConstructor;
|
|
19
23
|
default: boolean;
|
|
20
24
|
};
|
|
21
|
-
canColDrag: {
|
|
22
|
-
type: BooleanConstructor;
|
|
23
|
-
default: boolean;
|
|
24
|
-
};
|
|
25
25
|
clearSelectOnPageChange: {
|
|
26
26
|
type: BooleanConstructor;
|
|
27
27
|
default: boolean;
|
|
@@ -66,7 +66,7 @@ export declare const TableProps: {
|
|
|
66
66
|
};
|
|
67
67
|
slotsTemplate: {
|
|
68
68
|
type: PropType<Recordable<any>>;
|
|
69
|
-
default: {};
|
|
69
|
+
default: () => {};
|
|
70
70
|
};
|
|
71
71
|
showIndexColumn: {
|
|
72
72
|
type: BooleanConstructor;
|
|
@@ -97,67 +97,8 @@ export declare const TableProps: {
|
|
|
97
97
|
default: boolean;
|
|
98
98
|
};
|
|
99
99
|
pagination: {
|
|
100
|
-
type: PropType<Boolean |
|
|
101
|
-
|
|
102
|
-
defaultCurrent: NumberConstructor;
|
|
103
|
-
disabled: {
|
|
104
|
-
type: BooleanConstructor;
|
|
105
|
-
default: any;
|
|
106
|
-
};
|
|
107
|
-
current: NumberConstructor;
|
|
108
|
-
defaultPageSize: NumberConstructor;
|
|
109
|
-
pageSize: NumberConstructor;
|
|
110
|
-
hideOnSinglePage: {
|
|
111
|
-
type: BooleanConstructor;
|
|
112
|
-
default: any;
|
|
113
|
-
};
|
|
114
|
-
showSizeChanger: {
|
|
115
|
-
type: BooleanConstructor;
|
|
116
|
-
default: any;
|
|
117
|
-
};
|
|
118
|
-
pageSizeOptions: PropType<(string | number)[]>;
|
|
119
|
-
buildOptionText: PropType<(opt: {
|
|
120
|
-
value: any;
|
|
121
|
-
}) => any>;
|
|
122
|
-
showQuickJumper: {
|
|
123
|
-
type: PropType<boolean | {
|
|
124
|
-
goButton?: any;
|
|
125
|
-
}>;
|
|
126
|
-
default: boolean | {
|
|
127
|
-
goButton?: any;
|
|
128
|
-
};
|
|
129
|
-
};
|
|
130
|
-
showTotal: PropType<(total: number, range: [number, number]) => any>;
|
|
131
|
-
size: PropType<"default" | "small">;
|
|
132
|
-
simple: {
|
|
133
|
-
type: BooleanConstructor;
|
|
134
|
-
default: any;
|
|
135
|
-
};
|
|
136
|
-
locale: ObjectConstructor;
|
|
137
|
-
prefixCls: StringConstructor;
|
|
138
|
-
selectPrefixCls: StringConstructor;
|
|
139
|
-
totalBoundaryShowSizeChanger: NumberConstructor;
|
|
140
|
-
selectComponentClass: StringConstructor;
|
|
141
|
-
itemRender: PropType<(opt: {
|
|
142
|
-
page: number;
|
|
143
|
-
type: "page" | "prev" | "next" | "jump-prev" | "jump-next";
|
|
144
|
-
originalElement: any;
|
|
145
|
-
}) => any>;
|
|
146
|
-
role: StringConstructor;
|
|
147
|
-
responsive: BooleanConstructor;
|
|
148
|
-
showLessItems: {
|
|
149
|
-
type: BooleanConstructor;
|
|
150
|
-
default: any;
|
|
151
|
-
};
|
|
152
|
-
onChange: PropType<(page: number, pageSize: number) => void>;
|
|
153
|
-
onShowSizeChange: PropType<(current: number, size: number) => void>;
|
|
154
|
-
'onUpdate:current': PropType<(current: number) => void>;
|
|
155
|
-
'onUpdate:pageSize': PropType<(size: number) => void>;
|
|
156
|
-
}>>>;
|
|
157
|
-
default: {
|
|
158
|
-
pageSize: number;
|
|
159
|
-
current: number;
|
|
160
|
-
};
|
|
100
|
+
type: PropType<Boolean | PaginationProps>;
|
|
101
|
+
default: any;
|
|
161
102
|
};
|
|
162
103
|
loading: {
|
|
163
104
|
type: BooleanConstructor;
|
|
@@ -175,11 +116,11 @@ export declare const TableProps: {
|
|
|
175
116
|
};
|
|
176
117
|
onTableChange: {
|
|
177
118
|
type: FunctionConstructor;
|
|
178
|
-
default: () =>
|
|
119
|
+
default: () => {};
|
|
179
120
|
};
|
|
180
121
|
onDownload: {
|
|
181
122
|
type: FunctionConstructor;
|
|
182
|
-
default: (excelData: DownloadType) =>
|
|
123
|
+
default: (excelData: DownloadType) => {};
|
|
183
124
|
};
|
|
184
125
|
rowSelection: {
|
|
185
126
|
type: PropType<TableRowSelection<any>>;
|
|
@@ -190,7 +131,7 @@ export declare const TableProps: {
|
|
|
190
131
|
};
|
|
191
132
|
customRow: {
|
|
192
133
|
type: PropType<(record: any, index: any) => void>;
|
|
193
|
-
default: () =>
|
|
134
|
+
default: () => {};
|
|
194
135
|
};
|
|
195
136
|
childrenColumnName: {
|
|
196
137
|
type: StringConstructor;
|
|
@@ -213,10 +154,14 @@ export declare const TableProps: {
|
|
|
213
154
|
registerInstance: {
|
|
214
155
|
type: PropType<(instance: TableActionType) => void>;
|
|
215
156
|
};
|
|
216
|
-
|
|
157
|
+
onSearch: {
|
|
217
158
|
type: PropType<(params: Recordable) => void>;
|
|
218
159
|
default: (params: Recordable) => void;
|
|
219
160
|
};
|
|
161
|
+
onAdd: {
|
|
162
|
+
type: PropType<(params: Recordable) => void>;
|
|
163
|
+
default: (params: Recordable) => {};
|
|
164
|
+
};
|
|
220
165
|
onUpdate: {
|
|
221
166
|
type: PropType<(params: {
|
|
222
167
|
row: Recordable;
|
|
@@ -225,7 +170,7 @@ export declare const TableProps: {
|
|
|
225
170
|
default: (params: {
|
|
226
171
|
row: Recordable;
|
|
227
172
|
index: number;
|
|
228
|
-
}) =>
|
|
173
|
+
}) => {};
|
|
229
174
|
};
|
|
230
175
|
onDelete: {
|
|
231
176
|
type: PropType<(params: {
|
|
@@ -235,10 +180,10 @@ export declare const TableProps: {
|
|
|
235
180
|
default: (params: {
|
|
236
181
|
row: Recordable;
|
|
237
182
|
index: number;
|
|
238
|
-
}) =>
|
|
183
|
+
}) => {};
|
|
239
184
|
};
|
|
240
185
|
onDeletes: {
|
|
241
186
|
type: PropType<(params: Recordable) => void>;
|
|
242
|
-
default: (params: Recordable) =>
|
|
187
|
+
default: (params: Recordable) => {};
|
|
243
188
|
};
|
|
244
189
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Recordable } from "@dt-frames/core";
|
|
2
2
|
import { Key, TableRowSelection } from "ant-design-vue/es/table/interface";
|
|
3
|
-
import { PaginationProps } from "ant-design-vue/es/pagination";
|
|
4
3
|
import { SetColumnsParams } from "./header.type";
|
|
5
|
-
import { BasicColumn, BasicTableProps } from "./table.type";
|
|
4
|
+
import { BasicColumn, BasicTableProps, PaginationProps } from "./table.type";
|
|
6
5
|
export declare type TableActionType = {
|
|
7
6
|
setProps: (props: Partial<BasicTableProps>) => void;
|
|
8
7
|
setLoading: (loading: boolean) => void;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { DictType, Recordable } from "@dt-frames/core";
|
|
2
2
|
import { ColumnProps, TableProps as ATableProps } from "ant-design-vue/es/table";
|
|
3
|
-
import { ComputedRef, ExtractPropTypes, VNode } from "vue";
|
|
3
|
+
import { ComputedRef, ExtractPropTypes, Ref, VNode } from "vue";
|
|
4
4
|
import { TableProps } from "../props";
|
|
5
|
+
import { PaginationProps as APaginationProps } from "ant-design-vue/es/pagination/Pagination";
|
|
5
6
|
export declare type ButtonFlag = 'OK' | 'CANCEL' | 'ADD' | 'DEL' | 'DELS' | 'UPDATE';
|
|
7
|
+
export declare type DownloadType = ('current' | 'select' | 'all');
|
|
6
8
|
export declare type TableSetting = {
|
|
7
|
-
download?: boolean;
|
|
8
|
-
onlyFrontDownload?: boolean;
|
|
9
|
-
onlyBackDowonload?: boolean;
|
|
9
|
+
download?: boolean | DownloadType[];
|
|
10
10
|
setting?: boolean;
|
|
11
11
|
fullscreen?: boolean;
|
|
12
12
|
};
|
|
@@ -46,14 +46,14 @@ export interface BasicColumn extends ColumnProps<Recordable> {
|
|
|
46
46
|
}
|
|
47
47
|
export declare type ButtonType = {
|
|
48
48
|
t?: string;
|
|
49
|
-
|
|
50
|
-
icon?: string;
|
|
49
|
+
label?: string | ((row: Recordable) => string);
|
|
50
|
+
icon?: string | ((row: Recordable) => string);
|
|
51
51
|
auth?: string;
|
|
52
52
|
color?: string;
|
|
53
53
|
class?: string;
|
|
54
54
|
type?: 'primary' | 'ghost' | 'dashed' | 'link' | 'text' | 'default';
|
|
55
55
|
size?: 'large' | 'middle' | 'small';
|
|
56
|
-
loading?: boolean
|
|
56
|
+
loading?: Ref<boolean>;
|
|
57
57
|
disabled?: boolean;
|
|
58
58
|
show?: boolean | ((row?: Recordable) => boolean) | ComputedRef<boolean>;
|
|
59
59
|
preIcon?: string;
|
|
@@ -76,8 +76,13 @@ export declare type ColumnChangeParam = {
|
|
|
76
76
|
fixed: boolean | 'left' | 'right' | undefined;
|
|
77
77
|
visible: boolean;
|
|
78
78
|
};
|
|
79
|
-
export declare type
|
|
79
|
+
export declare type PaginationProps = (APaginationProps & {
|
|
80
|
+
class?: string;
|
|
81
|
+
});
|
|
82
|
+
export declare type BasicTableProps = Omit<ATableProps, 'columns' | 'pagination'> & ExtractPropTypes<typeof TableProps> & {
|
|
80
83
|
onColumnsChange?: (data: ColumnChangeParam[]) => void;
|
|
84
|
+
columns: BasicColumn[];
|
|
85
|
+
pagination: PaginationProps | boolean;
|
|
81
86
|
};
|
|
82
87
|
export declare type SorterResult = {
|
|
83
88
|
column: ColumnProps;
|
package/es/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare const test: any;
|