@dazhicheng/ui 1.5.265 → 1.6.0
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/dist/components/tt-area/TtArea.vue.js +1 -1
- package/dist/components/tt-drawer/src/components/DrawerHeader.vue.js +2 -2
- package/dist/components/tt-drawer/src/hooks/useResizable.js +2 -2
- package/dist/components/tt-form/src/components/FormElInput.vue.js +51 -38
- package/dist/components/tt-form/src/form-render/FormField.vue2.js +36 -36
- package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.d.ts +3 -3
- package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.js +3 -1
- package/dist/components/tt-icon/index.vue.js +2 -2
- package/dist/components/tt-loading/src/loading.vue.js +2 -2
- package/dist/components/tt-modal-form/index.vue.js +13 -12
- package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.d.ts +2 -2
- package/dist/components/tt-panel-select/src/hooks/usePanelData.js +93 -86
- package/dist/components/tt-panel-select/src/index.vue.js +1 -0
- package/dist/components/tt-select/src/Select.vue.d.ts +4 -4
- package/dist/components/tt-select/src/components/Table.vue.d.ts +4 -4
- package/dist/components/tt-table/index.d.ts +523 -358
- package/dist/components/tt-table/index.js +7 -4
- package/dist/components/tt-table/src/Table.vue.d.ts +306 -216
- package/dist/components/tt-table/src/Table.vue.js +405 -618
- package/dist/components/tt-table/src/TableForm.vue.d.ts +384 -19
- package/dist/components/tt-table/src/TableForm.vue.js +219 -228
- package/dist/components/tt-table/src/components/TableAction.vue.js +108 -131
- package/dist/components/tt-table/src/components/TableButtons.js +25 -25
- package/dist/components/tt-table/src/components/TableColumnModal.vue2.js +88 -85
- package/dist/components/tt-table/src/components/TableToolbarTools.vue.d.ts +80 -0
- package/dist/components/tt-table/src/components/{TableToobalTools.vue.js → TableToolbarTools.vue.js} +29 -31
- package/dist/components/tt-table/src/components/TableToolbarTools.vue2.js +4 -0
- package/dist/components/tt-table/src/emits.js +2 -1
- package/dist/components/tt-table/src/hooks/useColumnPersistence.d.ts +19 -0
- package/dist/components/tt-table/src/hooks/useColumnPersistence.js +63 -0
- package/dist/components/tt-table/src/hooks/useColumns.d.ts +505 -21
- package/dist/components/tt-table/src/hooks/useColumns.js +100 -245
- package/dist/components/tt-table/src/hooks/useGridProps.d.ts +36 -0
- package/dist/components/tt-table/src/hooks/useGridProps.js +121 -0
- package/dist/components/tt-table/src/hooks/useKeyboardNav.d.ts +11 -0
- package/dist/components/tt-table/src/hooks/useKeyboardNav.js +97 -0
- package/dist/components/tt-table/src/hooks/usePagination.d.ts +14 -8
- package/dist/components/tt-table/src/hooks/usePagination.js +29 -33
- package/dist/components/tt-table/src/hooks/useQuery.d.ts +41 -0
- package/dist/components/tt-table/src/hooks/useQuery.js +147 -0
- package/dist/components/tt-table/src/hooks/useRowIdentity.d.ts +22 -0
- package/dist/components/tt-table/src/hooks/useRowIdentity.js +96 -0
- package/dist/components/tt-table/src/hooks/useRowSelection.d.ts +23 -7
- package/dist/components/tt-table/src/hooks/useRowSelection.js +95 -71
- package/dist/components/tt-table/src/hooks/{useLeftRightSlot.d.ts → useSideSlot.d.ts} +25 -17
- package/dist/components/tt-table/src/hooks/useSideSlot.js +77 -0
- package/dist/components/tt-table/src/hooks/useSyncProps.d.ts +12 -0
- package/dist/components/tt-table/src/hooks/useSyncProps.js +55 -0
- package/dist/components/tt-table/src/hooks/useTableData.d.ts +71 -0
- package/dist/components/tt-table/src/hooks/useTableData.js +307 -0
- package/dist/components/tt-table/src/hooks/useTableFooter.d.ts +15 -0
- package/dist/components/tt-table/src/hooks/useTableFooter.js +46 -0
- package/dist/components/tt-table/src/hooks/useTableForm.d.ts +10 -5
- package/dist/components/tt-table/src/hooks/useTableForm.js +55 -48
- package/dist/components/tt-table/src/hooks/useTableMethods.d.ts +165 -0
- package/dist/components/tt-table/src/hooks/useTableMethods.js +183 -0
- package/dist/components/tt-table/src/hooks/useTableRender.d.ts +24 -55
- package/dist/components/tt-table/src/props.d.ts +318 -151
- package/dist/components/tt-table/src/props.js +117 -270
- package/dist/components/tt-table/src/table-defaults.d.ts +25 -0
- package/dist/components/tt-table/src/table-defaults.js +71 -0
- package/dist/components/tt-table/src/table-mutation-events.d.ts +43 -0
- package/dist/components/tt-table/src/table-mutation-events.js +70 -0
- package/dist/components/tt-table/src/types/table.d.ts +207 -88
- package/dist/components/tt-table/src/types/tableAction.d.ts +23 -0
- package/dist/components/tt-table/src/types/tableForm.d.ts +15 -26
- package/dist/components/tt-table/src/utils/action-tab-index.d.ts +2 -0
- package/dist/components/tt-table/src/utils/action-tab-index.js +50 -0
- package/dist/components/tt-table/src/utils/context.js +25 -12
- package/dist/components/tt-table/src/utils/table-api.d.ts +136 -58
- package/dist/components/tt-table/src/utils/table-api.js +198 -165
- package/dist/components/tt-table/src/utils/table-form-api.d.ts +11 -11
- package/dist/components/tt-table/src/utils/table-form-api.js +41 -31
- package/dist/components/types.d.ts +0 -20
- package/dist/hooks/useSetup.js +0 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.js +105 -101
- package/dist/packages/hooks/src/useDebounce.js +6 -6
- package/dist/packages/utils/src/is.js +20 -18
- package/dist/packages/utils/src/tool.js +76 -149
- package/dist/style.css +1 -1
- package/dist/utils/uppercaseInput.d.ts +29 -0
- package/dist/utils/uppercaseInput.js +16 -0
- package/package.json +3 -3
- package/dist/components/tt-table/src/components/TableToobalTools.vue.d.ts +0 -576
- package/dist/components/tt-table/src/components/TableToobalTools.vue2.js +0 -4
- package/dist/components/tt-table/src/enum.d.ts +0 -2
- package/dist/components/tt-table/src/hooks/useCellArea.d.ts +0 -15
- package/dist/components/tt-table/src/hooks/useCellArea.js +0 -15
- package/dist/components/tt-table/src/hooks/useCustomColumns.d.ts +0 -20
- package/dist/components/tt-table/src/hooks/useCustomColumns.js +0 -65
- package/dist/components/tt-table/src/hooks/useDataSource.d.ts +0 -29
- package/dist/components/tt-table/src/hooks/useDataSource.js +0 -232
- package/dist/components/tt-table/src/hooks/useLeftRightSlot.js +0 -64
- package/dist/components/tt-table/src/hooks/useTable.d.ts +0 -7
- package/dist/components/tt-table/src/hooks/useTableEvent.d.ts +0 -101
- package/dist/components/tt-table/src/hooks/useTableEvent.js +0 -197
- package/dist/components/tt-table/src/hooks/useTableFormEvent.d.ts +0 -10
- package/dist/components/tt-table/src/hooks/useTableHeight.d.ts +0 -15
- package/dist/components/tt-table/src/hooks/useTableSlot.d.ts +0 -11
- package/dist/components/tt-table/src/hooks/useTableSlot.js +0 -17
- package/dist/components/tt-table/src/utils/filters.d.ts +0 -109
- package/dist/components/tt-table/src/utils/vxeTable.d.ts +0 -28
- package/dist/packages/utils/src/check.js +0 -10
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropType
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
2
|
import { TtExtendedFormApi, TtFormProps } from '../../tt-form';
|
|
3
3
|
import { VxeTableDefines, VxeTablePropTypes } from 'vxe-table';
|
|
4
4
|
import { TtTableExtendedTableApi, TtTableProps } from './types/table';
|
|
@@ -7,11 +7,20 @@ import { TtTableToolsProps } from './types/tableTools';
|
|
|
7
7
|
/** 表格参数 */
|
|
8
8
|
export declare const tableProps: {
|
|
9
9
|
/** 是否显示toolbar */
|
|
10
|
-
showToolbar:
|
|
10
|
+
showToolbar: {
|
|
11
|
+
type: BooleanConstructor;
|
|
12
|
+
default: () => boolean | undefined;
|
|
13
|
+
};
|
|
11
14
|
/** 具体某些列排序 field数组 */
|
|
12
|
-
columnsFieldSort:
|
|
15
|
+
columnsFieldSort: {
|
|
16
|
+
type: PropType<string[]>;
|
|
17
|
+
default: () => string[] | undefined;
|
|
18
|
+
};
|
|
13
19
|
/** 具体某些列不排序 field数组 */
|
|
14
|
-
columnsFieldNoSort:
|
|
20
|
+
columnsFieldNoSort: {
|
|
21
|
+
type: PropType<string[]>;
|
|
22
|
+
default: () => string[] | undefined;
|
|
23
|
+
};
|
|
15
24
|
/** 是否显示右边刷新按钮 */
|
|
16
25
|
showRefresh: {
|
|
17
26
|
type: BooleanConstructor;
|
|
@@ -27,17 +36,16 @@ export declare const tableProps: {
|
|
|
27
36
|
type: BooleanConstructor;
|
|
28
37
|
default: () => boolean | undefined;
|
|
29
38
|
};
|
|
30
|
-
/**
|
|
31
|
-
|
|
39
|
+
/** 不可自定义列数组 field数组 */
|
|
40
|
+
notSetColumnField: {
|
|
41
|
+
type: PropType<string[]>;
|
|
42
|
+
default: () => string[] | undefined;
|
|
43
|
+
};
|
|
44
|
+
/** 是否显示表格上方 alert */
|
|
45
|
+
showTableAlert: {
|
|
32
46
|
type: BooleanConstructor;
|
|
33
47
|
default: () => boolean | undefined;
|
|
34
48
|
};
|
|
35
|
-
/** 不可自定义列数组 field数组 */
|
|
36
|
-
notSetColumnField: any;
|
|
37
|
-
/** 需要对不显示的字段进行过滤 主要针对于自定义 field数组 */
|
|
38
|
-
filterNoVisibleField: any;
|
|
39
|
-
/** 是否显示表格上方 alert */
|
|
40
|
-
showTableAlert: any;
|
|
41
49
|
/** api请求方法 */
|
|
42
50
|
api: {
|
|
43
51
|
type: PropType<(...arg: any[]) => Promise<any>>;
|
|
@@ -46,17 +54,12 @@ export declare const tableProps: {
|
|
|
46
54
|
/** 表格额外参数 */
|
|
47
55
|
searchInfo: {
|
|
48
56
|
type: ObjectConstructor;
|
|
49
|
-
default: () =>
|
|
57
|
+
default: () => Recordable<any> | undefined;
|
|
50
58
|
};
|
|
51
59
|
/** 是否初始化加载数据 */
|
|
52
|
-
immediate:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
* @deprecated
|
|
56
|
-
*/
|
|
57
|
-
resultCode: {
|
|
58
|
-
type: (NumberConstructor | StringConstructor)[];
|
|
59
|
-
default: number;
|
|
60
|
+
immediate: {
|
|
61
|
+
type: BooleanConstructor;
|
|
62
|
+
default: () => boolean | undefined;
|
|
60
63
|
};
|
|
61
64
|
/** 请求后的回调 */
|
|
62
65
|
afterFetch: {
|
|
@@ -71,71 +74,87 @@ export declare const tableProps: {
|
|
|
71
74
|
/** data */
|
|
72
75
|
data: {
|
|
73
76
|
type: PropType<TtTableProps["data"]>;
|
|
74
|
-
default: never[];
|
|
77
|
+
default: () => never[];
|
|
75
78
|
};
|
|
76
79
|
/** 是否滚动加载数据 */
|
|
77
80
|
isScrollFetch: {
|
|
78
81
|
type: BooleanConstructor;
|
|
79
|
-
default: boolean;
|
|
82
|
+
default: () => boolean | undefined;
|
|
80
83
|
};
|
|
81
|
-
/**
|
|
82
|
-
|
|
84
|
+
/** 是否显示复选框 */
|
|
85
|
+
showCheckbox: {
|
|
83
86
|
type: BooleanConstructor;
|
|
84
|
-
default: boolean;
|
|
87
|
+
default: () => boolean | undefined;
|
|
88
|
+
};
|
|
89
|
+
/** 是否跨页保持复选框选中状态 */
|
|
90
|
+
reserveSelection: {
|
|
91
|
+
type: BooleanConstructor;
|
|
92
|
+
default: () => boolean | undefined;
|
|
85
93
|
};
|
|
86
|
-
/** 是否显示复选框 */
|
|
87
|
-
showCheckbox: any;
|
|
88
94
|
/** 是否显示单选框 */
|
|
89
|
-
showRadio:
|
|
95
|
+
showRadio: {
|
|
96
|
+
type: BooleanConstructor;
|
|
97
|
+
default: () => boolean | undefined;
|
|
98
|
+
};
|
|
90
99
|
/** 是否显示展开列 */
|
|
91
|
-
showExpand:
|
|
100
|
+
showExpand: {
|
|
101
|
+
type: BooleanConstructor;
|
|
102
|
+
default: () => boolean | undefined;
|
|
103
|
+
};
|
|
92
104
|
/** 是否显示序号 */
|
|
93
|
-
showIndex:
|
|
105
|
+
showIndex: {
|
|
106
|
+
type: BooleanConstructor;
|
|
107
|
+
default: () => boolean | undefined;
|
|
108
|
+
};
|
|
94
109
|
/** 是否需要列拖拽 */
|
|
95
|
-
isCellResize:
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
* @default true
|
|
100
|
-
*/
|
|
101
|
-
isColumnsDrag: any;
|
|
110
|
+
isCellResize: {
|
|
111
|
+
type: BooleanConstructor;
|
|
112
|
+
default: () => boolean | undefined;
|
|
113
|
+
};
|
|
102
114
|
/** 是否列排序 */
|
|
103
|
-
isCellSort:
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
*/
|
|
108
|
-
isAreaCheckData: any;
|
|
115
|
+
isCellSort: {
|
|
116
|
+
type: BooleanConstructor;
|
|
117
|
+
default: () => boolean | undefined;
|
|
118
|
+
};
|
|
109
119
|
/** 是否显示操作列 */
|
|
110
|
-
showAction:
|
|
120
|
+
showAction: {
|
|
121
|
+
type: BooleanConstructor;
|
|
122
|
+
default: () => boolean | undefined;
|
|
123
|
+
};
|
|
111
124
|
/** 操作列宽度 */
|
|
112
|
-
actionWidth:
|
|
125
|
+
actionWidth: {
|
|
126
|
+
type: NumberConstructor;
|
|
127
|
+
default: () => number | undefined;
|
|
128
|
+
};
|
|
113
129
|
/** 操作列列名 */
|
|
114
|
-
actionTitle:
|
|
130
|
+
actionTitle: {
|
|
131
|
+
type: StringConstructor;
|
|
132
|
+
default: () => string | undefined;
|
|
133
|
+
};
|
|
115
134
|
/** 操作列Props */
|
|
116
135
|
actionProps: {
|
|
117
136
|
type: PropType<VxeTableDefines.ColumnOptions>;
|
|
118
|
-
default: () =>
|
|
137
|
+
default: () => import('..').TtColumnOptions<any> | undefined;
|
|
119
138
|
};
|
|
120
139
|
/** 序号列Props */
|
|
121
140
|
indexColumnProps: {
|
|
122
141
|
type: PropType<VxeTableDefines.ColumnOptions>;
|
|
123
|
-
default: () =>
|
|
142
|
+
default: () => import('..').TtColumnOptions<any> | undefined;
|
|
124
143
|
};
|
|
125
144
|
/** 复选框列Props */
|
|
126
145
|
checkboxColumnProps: {
|
|
127
146
|
type: PropType<VxeTableDefines.ColumnOptions>;
|
|
128
|
-
default: () =>
|
|
147
|
+
default: () => import('..').TtColumnOptions<any> | undefined;
|
|
129
148
|
};
|
|
130
149
|
/** 展开行props */
|
|
131
150
|
expandColumnProps: {
|
|
132
151
|
type: PropType<VxeTableDefines.ColumnOptions>;
|
|
133
|
-
default: () =>
|
|
152
|
+
default: () => import('..').TtColumnOptions<any> | undefined;
|
|
134
153
|
};
|
|
135
154
|
/** 单选框列Props */
|
|
136
155
|
radioColumnProps: {
|
|
137
156
|
type: PropType<VxeTableDefines.ColumnOptions>;
|
|
138
|
-
default: () =>
|
|
157
|
+
default: () => import('..').TtColumnOptions<any> | undefined;
|
|
139
158
|
};
|
|
140
159
|
/** 表格行id */
|
|
141
160
|
tableRowId: {
|
|
@@ -147,9 +166,10 @@ export declare const tableProps: {
|
|
|
147
166
|
type: PropType<TtTableProps["customizeColumn"]>;
|
|
148
167
|
};
|
|
149
168
|
/** 是否显示分页 */
|
|
150
|
-
showPager:
|
|
151
|
-
|
|
152
|
-
|
|
169
|
+
showPager: {
|
|
170
|
+
type: BooleanConstructor;
|
|
171
|
+
default: () => boolean | undefined;
|
|
172
|
+
};
|
|
153
173
|
/** 当前页数 field */
|
|
154
174
|
currentPageField: {
|
|
155
175
|
type: StringConstructor;
|
|
@@ -170,32 +190,28 @@ export declare const tableProps: {
|
|
|
170
190
|
type: StringConstructor;
|
|
171
191
|
default: () => string | undefined;
|
|
172
192
|
};
|
|
173
|
-
modelValue: {
|
|
174
|
-
type: PropType<Recordable[]>;
|
|
175
|
-
default: () => never[];
|
|
176
|
-
};
|
|
177
|
-
/** 标题内容 */
|
|
178
|
-
title: any;
|
|
179
|
-
/** 是否显示标题 */
|
|
180
|
-
showTitle: any;
|
|
181
|
-
/** 是否自适应高度 */
|
|
182
|
-
autoHeight: any;
|
|
183
193
|
/**
|
|
184
|
-
*
|
|
185
|
-
*
|
|
194
|
+
* 是否自适应高度
|
|
195
|
+
*
|
|
196
|
+
* 组件方式默认 `true`,与 `table-api.ts` 的 `getDefaultState()` 里 hook 方式默认 `false` 有意不同,
|
|
197
|
+
* 不要统一:改任一边都会改变现有页面的表格高度。因此它不进 `createSharedTableDefaults()`。
|
|
186
198
|
*/
|
|
187
|
-
|
|
199
|
+
autoHeight: any;
|
|
188
200
|
/** 左侧插槽的宽度 */
|
|
189
|
-
leftSlotWidth:
|
|
201
|
+
leftSlotWidth: {
|
|
202
|
+
type: NumberConstructor;
|
|
203
|
+
default: () => number | undefined;
|
|
204
|
+
};
|
|
190
205
|
/** 右侧插槽的宽度 */
|
|
191
|
-
rightSlotWidth:
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
type: StringConstructor;
|
|
195
|
-
default: () => string | undefined;
|
|
206
|
+
rightSlotWidth: {
|
|
207
|
+
type: NumberConstructor;
|
|
208
|
+
default: () => number | undefined;
|
|
196
209
|
};
|
|
197
210
|
/** 暂无数据的样式 */
|
|
198
|
-
emptyImageStyle:
|
|
211
|
+
emptyImageStyle: {
|
|
212
|
+
type: ObjectConstructor;
|
|
213
|
+
default: () => import('vue').CSSProperties | undefined;
|
|
214
|
+
};
|
|
199
215
|
/** 暂无数据 */
|
|
200
216
|
emptyText: {
|
|
201
217
|
type: StringConstructor;
|
|
@@ -207,16 +223,19 @@ export declare const tableProps: {
|
|
|
207
223
|
*/
|
|
208
224
|
emptyImageStatus: {
|
|
209
225
|
type: PropType<"no-data" | "no-search">;
|
|
210
|
-
default:
|
|
226
|
+
default: () => "no-data" | "no-search" | undefined;
|
|
211
227
|
};
|
|
212
228
|
/** 未查询时文字 */
|
|
213
229
|
noSearchText: {
|
|
214
230
|
type: StringConstructor;
|
|
215
231
|
default: () => string | undefined;
|
|
216
232
|
};
|
|
217
|
-
/**
|
|
218
|
-
|
|
219
|
-
|
|
233
|
+
/**
|
|
234
|
+
* 储存的key值,支持函数动态获取
|
|
235
|
+
*
|
|
236
|
+
* 组件方式固定取 `""`,与 `table-api.ts` 的 hook 方式取 `GlobalConfig.table?.columnsKey` 有意不同,
|
|
237
|
+
* 不要统一:统一会改变组件方式下的列配置缓存 key,已存的服务端列配置会读不到。
|
|
238
|
+
*/
|
|
220
239
|
columnsKey: {
|
|
221
240
|
type: PropType<string | (() => string)>;
|
|
222
241
|
default: string;
|
|
@@ -231,26 +250,21 @@ export declare const tableProps: {
|
|
|
231
250
|
type: PropType<string[]>;
|
|
232
251
|
default: () => string[] | undefined;
|
|
233
252
|
};
|
|
234
|
-
/**
|
|
235
|
-
* 是否需要行拖拽-树形表格
|
|
236
|
-
* @deprecated 请使用 row-config drag 配合row-drag-config配置 支持的版本看官方文档,后续不在维护行拖拽
|
|
237
|
-
* @default false
|
|
238
|
-
*/
|
|
239
|
-
treeNode: any;
|
|
240
|
-
/** 外部插槽 */
|
|
241
|
-
getSyncSlotComponent: {
|
|
242
|
-
type: PropType<(column: any, row: any, type: "default" | "edit") => VNode | VNode[] | string>;
|
|
243
|
-
};
|
|
244
253
|
/** 是否清空树形展开状态 */
|
|
245
|
-
clearTreeExpand:
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
+
clearTreeExpand: {
|
|
255
|
+
type: BooleanConstructor;
|
|
256
|
+
default: () => boolean | undefined;
|
|
257
|
+
};
|
|
258
|
+
/** 表头标题是否显示 tooltip */
|
|
259
|
+
showHeaderTooltip: {
|
|
260
|
+
type: BooleanConstructor;
|
|
261
|
+
default: () => boolean | undefined;
|
|
262
|
+
};
|
|
263
|
+
/** 单元格内容是否显示 tooltip */
|
|
264
|
+
showCellTooltip: {
|
|
265
|
+
type: BooleanConstructor;
|
|
266
|
+
default: () => boolean | undefined;
|
|
267
|
+
};
|
|
254
268
|
/** 表格的api */
|
|
255
269
|
tableApi: {
|
|
256
270
|
type: PropType<TtTableExtendedTableApi>;
|
|
@@ -261,52 +275,211 @@ export declare const tableProps: {
|
|
|
261
275
|
};
|
|
262
276
|
/** 是否使用搜索form */
|
|
263
277
|
useSearchForm: any;
|
|
264
|
-
/** 是否禁用Teleport将节点输送至body */
|
|
265
|
-
disabledTeleport: any;
|
|
266
278
|
/** 表格 testId,用于生成测试标识 */
|
|
267
279
|
testId: {
|
|
268
280
|
type: StringConstructor;
|
|
269
281
|
default: undefined;
|
|
270
282
|
};
|
|
271
283
|
};
|
|
272
|
-
/** table-pro配置参数 */
|
|
273
|
-
export declare const tableProProps: {
|
|
274
|
-
/** 按键配置项 */
|
|
275
|
-
keyboardConfig: {
|
|
276
|
-
type: PropType<VxeTablePropTypes.KeyboardConfig>;
|
|
277
|
-
default: () => VxeTablePropTypes.KeyboardConfig<any> | undefined;
|
|
278
|
-
};
|
|
279
|
-
/** 右键菜单配置项 */
|
|
280
|
-
menuConfig: {
|
|
281
|
-
type: PropType<VxeTablePropTypes.MenuConfig>;
|
|
282
|
-
default: () => {};
|
|
283
|
-
};
|
|
284
|
-
/** 鼠标配置项 */
|
|
285
|
-
mouseConfig: {
|
|
286
|
-
type: PropType<VxeTablePropTypes.MouseConfig>;
|
|
287
|
-
default: () => VxeTablePropTypes.MouseConfig | undefined;
|
|
288
|
-
};
|
|
289
|
-
/** 复选框配置项 */
|
|
290
|
-
checkboxConfig: {
|
|
291
|
-
type: PropType<VxeTablePropTypes.CheckboxConfig>;
|
|
292
|
-
default: () => VxeTablePropTypes.CheckboxConfig<VxeTablePropTypes.Row> | undefined;
|
|
293
|
-
};
|
|
294
|
-
/** 单选框配置项 */
|
|
295
|
-
radioConfig: {
|
|
296
|
-
type: PropType<VxeTablePropTypes.RadioConfig>;
|
|
297
|
-
default: () => VxeTablePropTypes.RadioConfig<VxeTablePropTypes.Row> | undefined;
|
|
298
|
-
};
|
|
299
|
-
};
|
|
300
284
|
/** tableForm 参数 */
|
|
301
285
|
export declare const tableFormProps: {
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
286
|
+
/**
|
|
287
|
+
* table参数
|
|
288
|
+
*
|
|
289
|
+
* `default` 必须是工厂函数:Vue 的 object prop 直接给对象时所有 `TtTableForm` 实例共享同一个引用。
|
|
290
|
+
*
|
|
291
|
+
* 取值为共用默认值加上组件方式口径的三个字段。`autoHeight` / `columnsKey` / `useSearchForm` 都不在
|
|
292
|
+
* 共用默认值里(前两个两处取值不同,后一个只在组件方式出现),而 `TtTableForm` 属于组件方式调用点,
|
|
293
|
+
* 因此这里显式补上组件方式的字面量 —— 它们与改动前 `Object.entries(tableProps).reduce(...)` 的产物逐字段相等。
|
|
294
|
+
*/
|
|
307
295
|
table: {
|
|
308
296
|
type: PropType<Partial<TtTableProps>>;
|
|
309
|
-
default:
|
|
297
|
+
default: () => {
|
|
298
|
+
autoHeight: boolean;
|
|
299
|
+
columnsKey: string;
|
|
300
|
+
useSearchForm: boolean;
|
|
301
|
+
loading?: boolean;
|
|
302
|
+
emptyText?: string;
|
|
303
|
+
noSearchText?: string;
|
|
304
|
+
emptyImageStyle?: import('vue').CSSProperties;
|
|
305
|
+
emptyImageStatus?: "no-data" | "no-search";
|
|
306
|
+
showHeaderTooltip?: boolean;
|
|
307
|
+
showCellTooltip?: boolean;
|
|
308
|
+
formApi?: Partial<TtExtendedFormApi>;
|
|
309
|
+
showSetting?: boolean;
|
|
310
|
+
showSetColumn?: boolean;
|
|
311
|
+
leftSlotWidth?: number;
|
|
312
|
+
rightSlotWidth?: number;
|
|
313
|
+
showRefresh?: boolean;
|
|
314
|
+
useHttpCache?: boolean;
|
|
315
|
+
defaultDisplayFields?: string[];
|
|
316
|
+
getColumnsApi?: (params: {
|
|
317
|
+
permissionOnlyCode: string;
|
|
318
|
+
userId: string | number;
|
|
319
|
+
}) => Promise<{
|
|
320
|
+
data: any;
|
|
321
|
+
}>;
|
|
322
|
+
setColumnsApi?: (params: {
|
|
323
|
+
permissionOnlyCode: string;
|
|
324
|
+
json: string;
|
|
325
|
+
userId: string | number;
|
|
326
|
+
}) => Promise<any>;
|
|
327
|
+
updateColumnsApi?: (params: {
|
|
328
|
+
permissionOnlyCode: string;
|
|
329
|
+
json: string;
|
|
330
|
+
userId: string | number;
|
|
331
|
+
id: string | number;
|
|
332
|
+
}) => Promise<any>;
|
|
333
|
+
customizeColumn?: ((column: import('..').TtColumnOptions<any>) => import('..').TtColumnOptions<any>) | undefined;
|
|
334
|
+
clearTreeExpand?: boolean;
|
|
335
|
+
data?: import('vue').MaybeRef<any[]> | undefined;
|
|
336
|
+
columns?: import('vue').MaybeRef<import('..').TtColumnOptions<any>[]> | undefined;
|
|
337
|
+
testId?: string;
|
|
338
|
+
toolTipErrorPlacement?: "top" | "bottom" | "left" | "right";
|
|
339
|
+
id?: VxeTablePropTypes.ID<any> | undefined;
|
|
340
|
+
zIndex?: VxeTablePropTypes.ZIndex | undefined;
|
|
341
|
+
size?: VxeTablePropTypes.Size | undefined;
|
|
342
|
+
height?: VxeTablePropTypes.Height | undefined;
|
|
343
|
+
params?: VxeTablePropTypes.Params;
|
|
344
|
+
round?: VxeTablePropTypes.Round | undefined;
|
|
345
|
+
border?: VxeTablePropTypes.Border | undefined;
|
|
346
|
+
fit?: VxeTablePropTypes.Fit | undefined;
|
|
347
|
+
layouts?: import("vxe-table").VxeGridPropTypes.Layouts | undefined;
|
|
348
|
+
align?: VxeTablePropTypes.Align | undefined;
|
|
349
|
+
pagerConfig?: import("vxe-table").VxeGridPropTypes.PagerConfig | undefined;
|
|
350
|
+
maxHeight?: VxeTablePropTypes.MaxHeight | undefined;
|
|
351
|
+
autoResize?: VxeTablePropTypes.AutoResize | undefined;
|
|
352
|
+
syncResize?: VxeTablePropTypes.SyncResize | undefined;
|
|
353
|
+
radioConfig?: VxeTablePropTypes.RadioConfig<any> | undefined;
|
|
354
|
+
checkboxConfig?: VxeTablePropTypes.CheckboxConfig<any> | undefined;
|
|
355
|
+
rowConfig?: VxeTablePropTypes.RowConfig<any> | undefined;
|
|
356
|
+
dragConfig?: VxeTablePropTypes.DragConfig<any> | undefined;
|
|
357
|
+
menuConfig?: VxeTablePropTypes.MenuConfig<any> | undefined;
|
|
358
|
+
virtualYConfig?: VxeTablePropTypes.VirtualYConfig | undefined;
|
|
359
|
+
scrollY?: VxeTablePropTypes.ScrollY | undefined;
|
|
360
|
+
minHeight?: VxeTablePropTypes.MinHeight | undefined;
|
|
361
|
+
showHeader?: VxeTablePropTypes.ShowHeader | undefined;
|
|
362
|
+
proxyConfig?: import("vxe-table").VxeGridPropTypes.ProxyConfig<any> | undefined;
|
|
363
|
+
toolbarConfig?: import("vxe-table").VxeGridPropTypes.ToolbarConfig | undefined;
|
|
364
|
+
formConfig?: import("vxe-table").VxeGridPropTypes.FormConfig | undefined;
|
|
365
|
+
zoomConfig?: import("vxe-table").VxeGridPropTypes.ZoomConfig | undefined;
|
|
366
|
+
stripe?: VxeTablePropTypes.Stripe | undefined;
|
|
367
|
+
padding?: VxeTablePropTypes.Padding | undefined;
|
|
368
|
+
headerAlign?: VxeTablePropTypes.HeaderAlign | undefined;
|
|
369
|
+
footerAlign?: VxeTablePropTypes.FooterAlign | undefined;
|
|
370
|
+
showFooter?: VxeTablePropTypes.ShowFooter | undefined;
|
|
371
|
+
footerData?: VxeTablePropTypes.FooterData | undefined;
|
|
372
|
+
footerMethod?: VxeTablePropTypes.FooterMethod<any> | undefined;
|
|
373
|
+
rowClassName?: VxeTablePropTypes.RowClassName<any> | undefined;
|
|
374
|
+
cellClassName?: VxeTablePropTypes.CellClassName<any> | undefined;
|
|
375
|
+
headerRowClassName?: VxeTablePropTypes.HeaderRowClassName<any> | undefined;
|
|
376
|
+
headerCellClassName?: VxeTablePropTypes.HeaderCellClassName<any> | undefined;
|
|
377
|
+
footerRowClassName?: VxeTablePropTypes.FooterRowClassName<any> | undefined;
|
|
378
|
+
footerCellClassName?: VxeTablePropTypes.FooterCellClassName<any> | undefined;
|
|
379
|
+
cellStyle?: VxeTablePropTypes.CellStyle<any> | undefined;
|
|
380
|
+
rowStyle?: VxeTablePropTypes.RowStyle<any> | undefined;
|
|
381
|
+
headerCellStyle?: VxeTablePropTypes.HeaderCellStyle<any> | undefined;
|
|
382
|
+
headerRowStyle?: VxeTablePropTypes.HeaderRowStyle<any> | undefined;
|
|
383
|
+
footerRowStyle?: VxeTablePropTypes.FooterRowStyle<any> | undefined;
|
|
384
|
+
footerCellStyle?: VxeTablePropTypes.FooterCellStyle<any> | undefined;
|
|
385
|
+
showCustomHeader?: VxeTablePropTypes.ShowCustomHeader | undefined;
|
|
386
|
+
mergeHeaderCells?: VxeTablePropTypes.MergeHeaderCells | undefined;
|
|
387
|
+
mergeCells?: VxeTablePropTypes.MergeCells<any> | undefined;
|
|
388
|
+
mergeFooterCells?: VxeTablePropTypes.MergeFooterCells<any> | undefined;
|
|
389
|
+
mergeFooterItems?: VxeTablePropTypes.MergeFooterItems<any> | undefined;
|
|
390
|
+
spanMethod?: VxeTablePropTypes.SpanMethod<any> | undefined;
|
|
391
|
+
footerSpanMethod?: VxeTablePropTypes.FooterSpanMethod<any> | undefined;
|
|
392
|
+
showOverflow?: VxeTablePropTypes.ShowOverflow | undefined;
|
|
393
|
+
showHeaderOverflow?: VxeTablePropTypes.ShowHeaderOverflow | undefined;
|
|
394
|
+
showFooterOverflow?: VxeTablePropTypes.ShowFooterOverflow | undefined;
|
|
395
|
+
keepSource?: VxeTablePropTypes.KeepSource | undefined;
|
|
396
|
+
columnConfig?: VxeTablePropTypes.ColumnConfig<any> | undefined;
|
|
397
|
+
cellConfig?: VxeTablePropTypes.CellConfig<any> | undefined;
|
|
398
|
+
headerCellConfig?: VxeTablePropTypes.HeaderCellConfig<any> | undefined;
|
|
399
|
+
footerCellConfig?: VxeTablePropTypes.FooterCellConfig<any> | undefined;
|
|
400
|
+
aggregateConfig?: VxeTablePropTypes.AggregateConfig<any> | undefined;
|
|
401
|
+
aggregateAccuracyConfig?: VxeTablePropTypes.AggregateAccuracyConfig<any> | undefined;
|
|
402
|
+
rowGroupConfig?: VxeTablePropTypes.RowGroupConfig<any> | undefined;
|
|
403
|
+
currentRowConfig?: VxeTablePropTypes.CurrentRowConfig<any> | undefined;
|
|
404
|
+
currentColumnConfig?: VxeTablePropTypes.CurrentColumnConfig<any> | undefined;
|
|
405
|
+
rowDragConfig?: VxeTablePropTypes.RowDragConfig<any> | undefined;
|
|
406
|
+
columnDragConfig?: VxeTablePropTypes.ColumnDragConfig<any> | undefined;
|
|
407
|
+
customConfig?: VxeTablePropTypes.CustomConfig<any> | undefined;
|
|
408
|
+
resizeConfig?: VxeTablePropTypes.ResizeConfig | undefined;
|
|
409
|
+
resizableConfig?: VxeTablePropTypes.ResizableConfig<any> | undefined;
|
|
410
|
+
seqConfig?: VxeTablePropTypes.SeqConfig<any> | undefined;
|
|
411
|
+
sortConfig?: VxeTablePropTypes.SortConfig<any> | undefined;
|
|
412
|
+
filterConfig?: VxeTablePropTypes.FilterConfig<any> | undefined;
|
|
413
|
+
floatingFilterConfig?: VxeTablePropTypes.FloatingFilterConfig<any> | undefined;
|
|
414
|
+
headerTooltipConfig?: VxeTablePropTypes.HeaderTooltipConfig<any> | undefined;
|
|
415
|
+
tooltipConfig?: VxeTablePropTypes.TooltipConfig<any> | undefined;
|
|
416
|
+
footerTooltipConfig?: VxeTablePropTypes.FooterTooltipConfig<any> | undefined;
|
|
417
|
+
exportConfig?: VxeTablePropTypes.ExportConfig | undefined;
|
|
418
|
+
importConfig?: VxeTablePropTypes.ImportConfig | undefined;
|
|
419
|
+
printConfig?: VxeTablePropTypes.PrintConfig | undefined;
|
|
420
|
+
expandConfig?: VxeTablePropTypes.ExpandConfig<any> | undefined;
|
|
421
|
+
treeConfig?: VxeTablePropTypes.TreeConfig<any> | undefined;
|
|
422
|
+
mouseConfig?: VxeTablePropTypes.MouseConfig | undefined;
|
|
423
|
+
areaConfig?: VxeTablePropTypes.AreaConfig<any> | undefined;
|
|
424
|
+
fnrConfig?: VxeTablePropTypes.FnrConfig<any> | undefined;
|
|
425
|
+
keyboardConfig?: VxeTablePropTypes.KeyboardConfig<any> | undefined;
|
|
426
|
+
clipConfig?: VxeTablePropTypes.ClipConfig<any> | undefined;
|
|
427
|
+
editConfig?: VxeTablePropTypes.EditConfig<any> | undefined;
|
|
428
|
+
editDirtyConfig?: VxeTablePropTypes.EditDirtyConfig | undefined;
|
|
429
|
+
validConfig?: VxeTablePropTypes.ValidConfig<any> | undefined;
|
|
430
|
+
editRules?: VxeTablePropTypes.EditRules<any> | undefined;
|
|
431
|
+
undoRedoHistoryConfig?: VxeTablePropTypes.UndoRedoHistoryConfig | undefined;
|
|
432
|
+
emptyRender?: VxeTablePropTypes.EmptyRender | undefined;
|
|
433
|
+
loadingConfig?: VxeTablePropTypes.LoadingConfig | undefined;
|
|
434
|
+
scrollX?: VxeTablePropTypes.ScrollX | undefined;
|
|
435
|
+
virtualXConfig?: VxeTablePropTypes.VirtualXConfig | undefined;
|
|
436
|
+
scrollbarConfig?: VxeTablePropTypes.ScrollbarConfig | undefined;
|
|
437
|
+
resizable?: VxeTablePropTypes.Resizable | undefined;
|
|
438
|
+
highlightCurrentRow?: VxeTablePropTypes.HighlightCurrentRow | undefined;
|
|
439
|
+
highlightHoverRow?: VxeTablePropTypes.HighlightHoverRow | undefined;
|
|
440
|
+
highlightCurrentColumn?: VxeTablePropTypes.HighlightCurrentColumn | undefined;
|
|
441
|
+
highlightHoverColumn?: VxeTablePropTypes.HighlightHoverColumn | undefined;
|
|
442
|
+
highlightCell?: VxeTablePropTypes.HighlightCell | undefined;
|
|
443
|
+
columnKey?: VxeTablePropTypes.ColumnKey | undefined;
|
|
444
|
+
rowKey?: VxeTablePropTypes.RowKey | undefined;
|
|
445
|
+
rowId?: VxeTablePropTypes.RowId | undefined;
|
|
446
|
+
animat?: VxeTablePropTypes.Animat | undefined;
|
|
447
|
+
delayHover?: VxeTablePropTypes.DelayHover | undefined;
|
|
448
|
+
showPager?: boolean;
|
|
449
|
+
currentPageField?: string;
|
|
450
|
+
pageSizeField?: string;
|
|
451
|
+
totalField?: string;
|
|
452
|
+
dataField?: string;
|
|
453
|
+
showCheckbox?: boolean;
|
|
454
|
+
reserveSelection?: boolean;
|
|
455
|
+
showExpand?: boolean;
|
|
456
|
+
showRadio?: boolean;
|
|
457
|
+
showIndex?: boolean;
|
|
458
|
+
showAction?: boolean;
|
|
459
|
+
showExport?: boolean;
|
|
460
|
+
actionWidth?: number;
|
|
461
|
+
actionTitle?: string;
|
|
462
|
+
isCellResize?: boolean;
|
|
463
|
+
isCellSort?: boolean;
|
|
464
|
+
actionProps?: import('..').TtColumnOptions<any> | undefined;
|
|
465
|
+
indexColumnProps?: import('..').TtColumnOptions<any> | undefined;
|
|
466
|
+
checkboxColumnProps?: import('..').TtColumnOptions<any> | undefined;
|
|
467
|
+
expandColumnProps?: import('..').TtColumnOptions<any> | undefined;
|
|
468
|
+
radioColumnProps?: import('..').TtColumnOptions<any> | undefined;
|
|
469
|
+
tableRowId?: string;
|
|
470
|
+
api?: (...arg: any[]) => Promise<Recordable | Recordable[]>;
|
|
471
|
+
filterApi?: (...arg: any[]) => Promise<Recordable | Recordable[]>;
|
|
472
|
+
searchInfo?: Recordable;
|
|
473
|
+
immediate?: boolean;
|
|
474
|
+
afterFetch?: ((data: any[], res: Recordable | Recordable[]) => Promise<any[]>) | undefined;
|
|
475
|
+
beforeFetch?: (params: Recordable) => Promise<Recordable>;
|
|
476
|
+
isScrollFetch?: boolean;
|
|
477
|
+
showToolbar?: boolean;
|
|
478
|
+
columnsFieldSort?: string[];
|
|
479
|
+
columnsFieldNoSort?: string[];
|
|
480
|
+
notSetColumnField?: string[];
|
|
481
|
+
showTableAlert?: boolean;
|
|
482
|
+
};
|
|
310
483
|
};
|
|
311
484
|
/** 是否使用搜索form */
|
|
312
485
|
useSearchForm: any;
|
|
@@ -352,11 +525,6 @@ export declare const tableOtherProps: {
|
|
|
352
525
|
type: PropType<VxeTablePropTypes.KeyboardConfig>;
|
|
353
526
|
default: () => VxeTablePropTypes.KeyboardConfig<any> | undefined;
|
|
354
527
|
};
|
|
355
|
-
/** 右键菜单配置项 */
|
|
356
|
-
menuConfig: {
|
|
357
|
-
type: PropType<VxeTablePropTypes.MenuConfig>;
|
|
358
|
-
default: () => {};
|
|
359
|
-
};
|
|
360
528
|
/** 鼠标配置项 */
|
|
361
529
|
mouseConfig: {
|
|
362
530
|
type: PropType<VxeTablePropTypes.MouseConfig>;
|
|
@@ -365,12 +533,12 @@ export declare const tableOtherProps: {
|
|
|
365
533
|
/** 复选框配置项 */
|
|
366
534
|
checkboxConfig: {
|
|
367
535
|
type: PropType<VxeTablePropTypes.CheckboxConfig>;
|
|
368
|
-
default: () => VxeTablePropTypes.CheckboxConfig<
|
|
536
|
+
default: () => VxeTablePropTypes.CheckboxConfig<any> | undefined;
|
|
369
537
|
};
|
|
370
538
|
/** 单选框配置项 */
|
|
371
539
|
radioConfig: {
|
|
372
540
|
type: PropType<VxeTablePropTypes.RadioConfig>;
|
|
373
|
-
default: () => VxeTablePropTypes.RadioConfig<
|
|
541
|
+
default: () => VxeTablePropTypes.RadioConfig<any> | undefined;
|
|
374
542
|
};
|
|
375
543
|
/** 列配置 */
|
|
376
544
|
columns: {
|
|
@@ -382,7 +550,7 @@ export declare const tableOtherProps: {
|
|
|
382
550
|
*/
|
|
383
551
|
height: {
|
|
384
552
|
type: (NumberConstructor | StringConstructor)[];
|
|
385
|
-
default: undefined;
|
|
553
|
+
default: () => VxeTablePropTypes.Height | undefined;
|
|
386
554
|
};
|
|
387
555
|
/**
|
|
388
556
|
* 设置所有内容过长时显示为省略号(如果是固定列建议设置该值,提升渲染速度
|
|
@@ -390,7 +558,7 @@ export declare const tableOtherProps: {
|
|
|
390
558
|
*/
|
|
391
559
|
showOverflow: {
|
|
392
560
|
type: PropType<TtTableProps["showOverflow"]>;
|
|
393
|
-
default:
|
|
561
|
+
default: () => VxeTablePropTypes.ShowOverflow | undefined;
|
|
394
562
|
};
|
|
395
563
|
/**
|
|
396
564
|
* @description 内部使用插槽重写title内容。true 和 'tooltip' 都会有 tooltip 效果,false 和其他的值会显示省略号不会有 tooltip 效果
|
|
@@ -398,22 +566,21 @@ export declare const tableOtherProps: {
|
|
|
398
566
|
*/
|
|
399
567
|
showHeaderOverflow: {
|
|
400
568
|
type: PropType<TtTableProps["showHeaderOverflow"]>;
|
|
401
|
-
default:
|
|
569
|
+
default: () => VxeTablePropTypes.ShowOverflow | undefined;
|
|
402
570
|
};
|
|
403
571
|
/** 分页配置 */
|
|
404
572
|
pagerConfig: {
|
|
405
573
|
type: PropType<TtTableProps["pagerConfig"]>;
|
|
406
574
|
default: () => import("vxe-table").VxeGridPropTypes.PagerConfig | undefined;
|
|
407
575
|
};
|
|
408
|
-
/**
|
|
576
|
+
/**
|
|
577
|
+
* toolbar 配置
|
|
578
|
+
*
|
|
579
|
+
* 不写 `default`,取值由共用默认值里的 `toolbarConfig: undefined` 提供:
|
|
580
|
+
* `useGridProps` 用解构默认值 `toolbarConfig = {}` 兜底,而 ES 解构默认值只对 `undefined` 生效。
|
|
581
|
+
*/
|
|
409
582
|
toolbarConfig: {
|
|
410
583
|
type: PropType<TtTableProps["toolbarConfig"]>;
|
|
411
|
-
default: () => null;
|
|
412
|
-
};
|
|
413
|
-
/** 缩放配置项 */
|
|
414
|
-
zoomConfig: {
|
|
415
|
-
type: PropType<TtTableProps["zoomConfig"]>;
|
|
416
|
-
default: () => null;
|
|
417
584
|
};
|
|
418
585
|
/** 表格大小 */
|
|
419
586
|
size: {
|