@antdv-vue/pro-table 0.0.0-stage → 2.0.3
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/CHANGELOG.md +255 -0
- package/README.md +106 -2
- package/dist/InternalTable.d.ts +360 -0
- package/dist/InternalTable.js +444 -0
- package/dist/RenderTypings.d.ts +33 -0
- package/dist/RenderTypings.js +1 -0
- package/dist/ResizableTableTitle.d.ts +24 -0
- package/dist/ResizableTableTitle.js +89 -0
- package/dist/Store/Provide.d.ts +68 -0
- package/dist/Store/Provide.js +132 -0
- package/dist/Table.d.ts +363 -0
- package/dist/Table.js +151 -0
- package/dist/TableRender.d.ts +54 -0
- package/dist/TableRender.js +295 -0
- package/dist/components/Alert/index.d.ts +45 -0
- package/dist/components/Alert/index.js +94 -0
- package/dist/components/Alert/style/index.d.ts +8 -0
- package/dist/components/Alert/style/index.js +11 -0
- package/dist/components/ColumnSetting/CheckboxList.d.ts +24 -0
- package/dist/components/ColumnSetting/CheckboxList.js +138 -0
- package/dist/components/ColumnSetting/CheckboxListItem.d.ts +17 -0
- package/dist/components/ColumnSetting/CheckboxListItem.js +84 -0
- package/dist/components/ColumnSetting/GroupCheckboxList.d.ts +22 -0
- package/dist/components/ColumnSetting/GroupCheckboxList.js +82 -0
- package/dist/components/ColumnSetting/ToolTipIcon.d.ts +12 -0
- package/dist/components/ColumnSetting/ToolTipIcon.js +47 -0
- package/dist/components/ColumnSetting/index.d.ts +26 -0
- package/dist/components/ColumnSetting/index.js +117 -0
- package/dist/components/ColumnSetting/style/index.d.ts +8 -0
- package/dist/components/ColumnSetting/style/index.js +73 -0
- package/dist/components/DragSortTable/index.d.ts +375 -0
- package/dist/components/DragSortTable/index.js +166 -0
- package/dist/components/DragSortTable/style/index.d.ts +8 -0
- package/dist/components/DragSortTable/style/index.js +25 -0
- package/dist/components/Dropdown/Button.d.ts +20 -0
- package/dist/components/Dropdown/Button.js +155 -0
- package/dist/components/Dropdown/index.d.ts +27 -0
- package/dist/components/Dropdown/index.js +149 -0
- package/dist/components/EditableTable/CellEditorTable.d.ts +63 -0
- package/dist/components/EditableTable/CellEditorTable.js +167 -0
- package/dist/components/EditableTable/EditableTable.d.ts +67 -0
- package/dist/components/EditableTable/EditableTable.js +141 -0
- package/dist/components/EditableTable/InternalEditableTable.d.ts +189 -0
- package/dist/components/EditableTable/InternalEditableTable.js +508 -0
- package/dist/components/EditableTable/RowEditorTable.d.ts +63 -0
- package/dist/components/EditableTable/RowEditorTable.js +147 -0
- package/dist/components/EditableTable/context.d.ts +9 -0
- package/dist/components/EditableTable/context.js +11 -0
- package/dist/components/EditableTable/index.d.ts +5 -0
- package/dist/components/EditableTable/index.js +5 -0
- package/dist/components/Form/FormRender.d.ts +77 -0
- package/dist/components/Form/FormRender.js +198 -0
- package/dist/components/Form/index.d.ts +33 -0
- package/dist/components/Form/index.js +91 -0
- package/dist/components/ToolBar/DensityIcon.d.ts +22 -0
- package/dist/components/ToolBar/DensityIcon.js +71 -0
- package/dist/components/ToolBar/FullScreenIcon.d.ts +6 -0
- package/dist/components/ToolBar/FullScreenIcon.js +30 -0
- package/dist/components/ToolBar/HeaderMenu.d.ts +22 -0
- package/dist/components/ToolBar/HeaderMenu.js +84 -0
- package/dist/components/ToolBar/index.d.ts +102 -0
- package/dist/components/ToolBar/index.js +322 -0
- package/dist/components/ToolBar/style/index.d.ts +8 -0
- package/dist/components/ToolBar/style/index.js +116 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +10 -0
- package/dist/pro-table.esm.js +3274 -0
- package/dist/style/index.d.ts +11 -0
- package/dist/style/index.js +162 -0
- package/dist/typing.d.ts +409 -0
- package/dist/typing.js +1 -0
- package/dist/useFetchData.d.ts +10 -0
- package/dist/useFetchData.js +243 -0
- package/dist/utils/cellRenderToFromItem.d.ts +52 -0
- package/dist/utils/cellRenderToFromItem.js +163 -0
- package/dist/utils/columnRender.d.ts +54 -0
- package/dist/utils/columnRender.js +148 -0
- package/dist/utils/columnSort.d.ts +7 -0
- package/dist/utils/columnSort.js +17 -0
- package/dist/utils/genProColumnsToColumns.d.ts +69 -0
- package/dist/utils/genProColumnsToColumns.js +197 -0
- package/dist/utils/index.d.ts +122 -0
- package/dist/utils/index.js +227 -0
- package/dist/utils/useDragSort.d.ts +182 -0
- package/dist/utils/useDragSort.js +162 -0
- package/package.json +67 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
# @antdv-vue/pro-table
|
|
2
|
+
|
|
3
|
+
## 2.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [ef5cfb6]
|
|
8
|
+
- @antdv-vue/pro-utils@2.1.1
|
|
9
|
+
- @antdv-vue/pro-card@3.0.2
|
|
10
|
+
- @antdv-vue/pro-field@2.0.2
|
|
11
|
+
- @antdv-vue/pro-form@2.1.1
|
|
12
|
+
|
|
13
|
+
## 2.0.2
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [244f208]
|
|
18
|
+
- @antdv-vue/pro-utils@2.1.0
|
|
19
|
+
- @antdv-vue/pro-form@2.1.0
|
|
20
|
+
- @antdv-vue/pro-field@2.0.1
|
|
21
|
+
- @antdv-vue/pro-card@3.0.1
|
|
22
|
+
|
|
23
|
+
## 2.0.1
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Remove debug logging from resizable table header rendering.
|
|
28
|
+
|
|
29
|
+
## 2.0.0
|
|
30
|
+
|
|
31
|
+
### Major Changes
|
|
32
|
+
|
|
33
|
+
- feat!: remove the UMD bundle target from package builds.
|
|
34
|
+
- docs: sync structured changelog pages for every package.
|
|
35
|
+
|
|
36
|
+
### Patch Changes
|
|
37
|
+
|
|
38
|
+
- Updated dependencies
|
|
39
|
+
- @antdv-vue/pro-card@3.0.0
|
|
40
|
+
- @antdv-vue/pro-field@2.0.0
|
|
41
|
+
- @antdv-vue/pro-form@2.0.0
|
|
42
|
+
- @antdv-vue/pro-provider@2.0.0
|
|
43
|
+
- @antdv-vue/pro-utils@2.0.0
|
|
44
|
+
|
|
45
|
+
## 1.0.36
|
|
46
|
+
|
|
47
|
+
### Patch Changes
|
|
48
|
+
|
|
49
|
+
- Updated dependencies
|
|
50
|
+
- @antdv-vue/pro-card@2.0.23
|
|
51
|
+
|
|
52
|
+
## 1.0.35
|
|
53
|
+
|
|
54
|
+
### Patch Changes
|
|
55
|
+
|
|
56
|
+
- Updated dependencies
|
|
57
|
+
- @antdv-vue/pro-utils@1.0.23
|
|
58
|
+
- @antdv-vue/pro-card@2.0.22
|
|
59
|
+
- @antdv-vue/pro-field@1.0.21
|
|
60
|
+
- @antdv-vue/pro-form@1.0.30
|
|
61
|
+
|
|
62
|
+
## 1.0.34
|
|
63
|
+
|
|
64
|
+
### Patch Changes
|
|
65
|
+
|
|
66
|
+
- fix table bugs
|
|
67
|
+
|
|
68
|
+
## 1.0.33
|
|
69
|
+
|
|
70
|
+
### Patch Changes
|
|
71
|
+
|
|
72
|
+
- fix bugs
|
|
73
|
+
- Updated dependencies
|
|
74
|
+
- @antdv-vue/pro-card@2.0.21
|
|
75
|
+
- @antdv-vue/pro-form@1.0.29
|
|
76
|
+
|
|
77
|
+
## 1.0.32
|
|
78
|
+
|
|
79
|
+
### Patch Changes
|
|
80
|
+
|
|
81
|
+
- Updated dependencies
|
|
82
|
+
- @antdv-vue/pro-form@1.0.28
|
|
83
|
+
|
|
84
|
+
## 1.0.31
|
|
85
|
+
|
|
86
|
+
### Patch Changes
|
|
87
|
+
|
|
88
|
+
- Updated dependencies
|
|
89
|
+
- @antdv-vue/pro-provider@1.0.14
|
|
90
|
+
- @antdv-vue/pro-card@2.0.20
|
|
91
|
+
- @antdv-vue/pro-field@1.0.20
|
|
92
|
+
- @antdv-vue/pro-form@1.0.27
|
|
93
|
+
- @antdv-vue/pro-utils@1.0.22
|
|
94
|
+
|
|
95
|
+
## 1.0.30
|
|
96
|
+
|
|
97
|
+
### Patch Changes
|
|
98
|
+
|
|
99
|
+
- fix layout filed form card bugs
|
|
100
|
+
- Updated dependencies
|
|
101
|
+
- @antdv-vue/pro-card@2.0.19
|
|
102
|
+
- @antdv-vue/pro-field@1.0.19
|
|
103
|
+
- @antdv-vue/pro-form@1.0.26
|
|
104
|
+
- @antdv-vue/pro-provider@1.0.13
|
|
105
|
+
- @antdv-vue/pro-utils@1.0.21
|
|
106
|
+
|
|
107
|
+
## 1.0.29
|
|
108
|
+
|
|
109
|
+
### Patch Changes
|
|
110
|
+
|
|
111
|
+
- Updated dependencies
|
|
112
|
+
- @antdv-vue/pro-provider@1.0.12
|
|
113
|
+
- @antdv-vue/pro-card@2.0.18
|
|
114
|
+
- @antdv-vue/pro-field@1.0.18
|
|
115
|
+
- @antdv-vue/pro-form@1.0.25
|
|
116
|
+
- @antdv-vue/pro-utils@1.0.20
|
|
117
|
+
|
|
118
|
+
## 1.0.28
|
|
119
|
+
|
|
120
|
+
### Patch Changes
|
|
121
|
+
|
|
122
|
+
- Updated dependencies
|
|
123
|
+
- @antdv-vue/pro-provider@1.0.11
|
|
124
|
+
- @antdv-vue/pro-card@2.0.17
|
|
125
|
+
- @antdv-vue/pro-field@1.0.17
|
|
126
|
+
- @antdv-vue/pro-form@1.0.24
|
|
127
|
+
- @antdv-vue/pro-utils@1.0.19
|
|
128
|
+
|
|
129
|
+
## 1.0.27
|
|
130
|
+
|
|
131
|
+
### Patch Changes
|
|
132
|
+
|
|
133
|
+
- add resizable column title support
|
|
134
|
+
- Updated dependencies
|
|
135
|
+
- @antdv-vue/pro-card@2.0.16
|
|
136
|
+
- @antdv-vue/pro-field@1.0.16
|
|
137
|
+
- @antdv-vue/pro-form@1.0.23
|
|
138
|
+
- @antdv-vue/pro-provider@1.0.10
|
|
139
|
+
- @antdv-vue/pro-utils@1.0.18
|
|
140
|
+
|
|
141
|
+
## 1.0.25
|
|
142
|
+
|
|
143
|
+
### Patch Changes
|
|
144
|
+
|
|
145
|
+
- fix bugs
|
|
146
|
+
- Updated dependencies
|
|
147
|
+
- @antdv-vue/pro-card@2.0.14
|
|
148
|
+
- @antdv-vue/pro-field@1.0.14
|
|
149
|
+
- @antdv-vue/pro-form@1.0.21
|
|
150
|
+
- @antdv-vue/pro-utils@1.0.16
|
|
151
|
+
|
|
152
|
+
## 1.0.25
|
|
153
|
+
|
|
154
|
+
### Patch Changes
|
|
155
|
+
|
|
156
|
+
- fix css-in-js style Transition bugs
|
|
157
|
+
- Updated dependencies
|
|
158
|
+
- @antdv-vue/pro-field@1.0.14
|
|
159
|
+
- @antdv-vue/pro-utils@1.0.16
|
|
160
|
+
- @antdv-vue/pro-card@2.0.14
|
|
161
|
+
- @antdv-vue/pro-form@1.0.21
|
|
162
|
+
|
|
163
|
+
## 1.0.24
|
|
164
|
+
|
|
165
|
+
### Patch Changes
|
|
166
|
+
|
|
167
|
+
- Updated dependencies
|
|
168
|
+
- @antdv-vue/pro-form@1.0.20
|
|
169
|
+
|
|
170
|
+
## 1.0.23
|
|
171
|
+
|
|
172
|
+
### Patch Changes
|
|
173
|
+
|
|
174
|
+
- Updated dependencies
|
|
175
|
+
- @antdv-vue/pro-form@1.0.19
|
|
176
|
+
|
|
177
|
+
## 1.0.22
|
|
178
|
+
|
|
179
|
+
### Patch Changes
|
|
180
|
+
|
|
181
|
+
- Updated dependencies
|
|
182
|
+
- @antdv-vue/pro-form@1.0.18
|
|
183
|
+
|
|
184
|
+
## 1.0.21
|
|
185
|
+
|
|
186
|
+
### Patch Changes
|
|
187
|
+
|
|
188
|
+
- fix bugs
|
|
189
|
+
- Updated dependencies
|
|
190
|
+
- @antdv-vue/pro-card@2.0.13
|
|
191
|
+
- @antdv-vue/pro-field@1.0.13
|
|
192
|
+
- @antdv-vue/pro-form@1.0.17
|
|
193
|
+
- @antdv-vue/pro-provider@1.0.9
|
|
194
|
+
- @antdv-vue/pro-utils@1.0.15
|
|
195
|
+
|
|
196
|
+
## 1.0.20
|
|
197
|
+
|
|
198
|
+
### Patch Changes
|
|
199
|
+
|
|
200
|
+
- fix card listy form some bugs
|
|
201
|
+
- Updated dependencies
|
|
202
|
+
- @antdv-vue/pro-card@2.0.12
|
|
203
|
+
- @antdv-vue/pro-form@1.0.16
|
|
204
|
+
|
|
205
|
+
## 1.0.19
|
|
206
|
+
|
|
207
|
+
### Patch Changes
|
|
208
|
+
|
|
209
|
+
- expose listy methods
|
|
210
|
+
|
|
211
|
+
## 1.0.18
|
|
212
|
+
|
|
213
|
+
### Patch Changes
|
|
214
|
+
|
|
215
|
+
- create listy card mode
|
|
216
|
+
- Updated dependencies
|
|
217
|
+
- @antdv-vue/pro-provider@1.0.8
|
|
218
|
+
- @antdv-vue/pro-utils@1.0.14
|
|
219
|
+
- @antdv-vue/pro-card@2.0.11
|
|
220
|
+
- @antdv-vue/pro-form@1.0.15
|
|
221
|
+
- @antdv-vue/pro-field@1.0.12
|
|
222
|
+
|
|
223
|
+
## 1.0.17
|
|
224
|
+
|
|
225
|
+
### Patch Changes
|
|
226
|
+
|
|
227
|
+
- Updated dependencies
|
|
228
|
+
- @antdv-vue/pro-card@2.0.10
|
|
229
|
+
- @antdv-vue/pro-provider@1.0.7
|
|
230
|
+
- @antdv-vue/pro-utils@1.0.13
|
|
231
|
+
- @antdv-vue/pro-field@1.0.11
|
|
232
|
+
- @antdv-vue/pro-form@1.0.14
|
|
233
|
+
|
|
234
|
+
## 1.0.16
|
|
235
|
+
|
|
236
|
+
### Patch Changes
|
|
237
|
+
|
|
238
|
+
- Updated dependencies
|
|
239
|
+
- @antdv-vue/pro-provider@1.0.6
|
|
240
|
+
- @antdv-vue/pro-card@2.0.9
|
|
241
|
+
- @antdv-vue/pro-field@1.0.10
|
|
242
|
+
- @antdv-vue/pro-form@1.0.13
|
|
243
|
+
- @antdv-vue/pro-utils@1.0.12
|
|
244
|
+
|
|
245
|
+
## 1.0.15
|
|
246
|
+
|
|
247
|
+
### Patch Changes
|
|
248
|
+
|
|
249
|
+
- fix ProForm bugs
|
|
250
|
+
- Updated dependencies
|
|
251
|
+
- @antdv-vue/pro-provider@1.0.5
|
|
252
|
+
- @antdv-vue/pro-field@1.0.9
|
|
253
|
+
- @antdv-vue/pro-utils@1.0.11
|
|
254
|
+
- @antdv-vue/pro-card@2.0.8
|
|
255
|
+
- @antdv-vue/pro-form@1.0.12
|
package/README.md
CHANGED
|
@@ -1,3 +1,107 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @antdv-vue/pro-table
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Enhanced table component with search form, toolbar, drag-and-drop sorting, and editable rows for Pro Components.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @antdv-vue/pro-table
|
|
9
|
+
# or
|
|
10
|
+
pnpm add @antdv-vue/pro-table
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Peer Dependencies
|
|
14
|
+
|
|
15
|
+
- `vue` >= 3.5.30
|
|
16
|
+
- `antdv-next` >= 1.3.6
|
|
17
|
+
|
|
18
|
+
## Components
|
|
19
|
+
|
|
20
|
+
| Component | Description |
|
|
21
|
+
|-----------|-------------|
|
|
22
|
+
| `ProTable` | Main table with search form, toolbar, and data fetching |
|
|
23
|
+
| `DragSortTable` | Table with drag-and-drop row sorting |
|
|
24
|
+
| `EditableTable` | Table with inline editable rows |
|
|
25
|
+
| `TableDropdown` | Dropdown actions for table toolbar |
|
|
26
|
+
| `TableDropdownButton` | Dropdown button for table actions |
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
|
|
30
|
+
### Basic Table
|
|
31
|
+
|
|
32
|
+
```vue
|
|
33
|
+
<script setup lang="ts">
|
|
34
|
+
import { ProTable } from '@antdv-vue/pro-table'
|
|
35
|
+
import type { ProColumns } from '@antdv-vue/pro-table'
|
|
36
|
+
|
|
37
|
+
const columns: ProColumns[] = [
|
|
38
|
+
{ title: 'Name', dataIndex: 'name', valueType: 'text' },
|
|
39
|
+
{ title: 'Age', dataIndex: 'age', valueType: 'digit' },
|
|
40
|
+
{ title: 'Status', dataIndex: 'status', valueType: 'select', valueEnum: statusEnum },
|
|
41
|
+
{ title: 'Created At', dataIndex: 'createdAt', valueType: 'date' },
|
|
42
|
+
{
|
|
43
|
+
title: 'Actions',
|
|
44
|
+
valueType: 'option',
|
|
45
|
+
render: (_, record) => [
|
|
46
|
+
<a key="edit" onClick={() => handleEdit(record)}>Edit</a>,
|
|
47
|
+
<a key="delete" onClick={() => handleDelete(record)}>Delete</a>,
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
]
|
|
51
|
+
|
|
52
|
+
async function fetchData(params: any) {
|
|
53
|
+
const res = await api.getList(params)
|
|
54
|
+
return { data: res.data, total: res.total, success: true }
|
|
55
|
+
}
|
|
56
|
+
</script>
|
|
57
|
+
|
|
58
|
+
<template>
|
|
59
|
+
<ProTable :columns="columns" :request="fetchData" row-key="id" />
|
|
60
|
+
</template>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Drag Sort Table
|
|
64
|
+
|
|
65
|
+
```vue
|
|
66
|
+
<script setup lang="ts">
|
|
67
|
+
import { DragSortTable } from '@antdv-vue/pro-table'
|
|
68
|
+
</script>
|
|
69
|
+
|
|
70
|
+
<template>
|
|
71
|
+
<DragSortTable
|
|
72
|
+
:columns="columns"
|
|
73
|
+
:data-source="dataSource"
|
|
74
|
+
:drag-sort-key="sortKey"
|
|
75
|
+
@drag-sort-end="onDragEnd"
|
|
76
|
+
/>
|
|
77
|
+
</template>
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Editable Table
|
|
81
|
+
|
|
82
|
+
```vue
|
|
83
|
+
<script setup lang="ts">
|
|
84
|
+
import { EditableTable } from '@antdv-vue/pro-table'
|
|
85
|
+
</script>
|
|
86
|
+
|
|
87
|
+
<template>
|
|
88
|
+
<EditableTable
|
|
89
|
+
v-model="dataSource"
|
|
90
|
+
:columns="columns"
|
|
91
|
+
:controlled="true"
|
|
92
|
+
/>
|
|
93
|
+
</template>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Dependencies
|
|
97
|
+
|
|
98
|
+
- `@antdv-vue/pro-card` — Card wrapper component
|
|
99
|
+
- `@antdv-vue/pro-field` — Field rendering components
|
|
100
|
+
- `@antdv-vue/pro-form` — Search form components
|
|
101
|
+
- `@antdv-vue/pro-provider` — Theme and configuration context
|
|
102
|
+
- `@antdv-vue/pro-utils` — Shared utilities
|
|
103
|
+
- `@dnd-kit/vue` — Drag-and-drop library
|
|
104
|
+
|
|
105
|
+
## License
|
|
106
|
+
|
|
107
|
+
[MIT](../../LICENSE)
|