7
7
8
8
<v-col cols =" 12" >
9
9
<VDrilldownTable
10
- :color = " tableSettings.color "
10
+ v-model = " selected "
11
11
:colors =" tableSettings.colors"
12
12
:density =" tableSettings.density"
13
13
:drilldown-key =" tableSettings.drilldownKey"
19
19
:hover =" tableSettings.hover"
20
20
:item-children-key =" tableSettings.itemChildrenKey"
21
21
:item-props =" tableSettings.itemProps"
22
+ :item-selectable =" tableSettings.itemSelectable"
22
23
:items =" tableSettings.items"
23
24
:items-length =" tableSettings.itemsLength"
24
25
:items-per-page =" tableSettings.itemsPerPage"
25
26
:items-per-page-options =" tableSettings.itemsPerPageOptions"
26
27
:items-per-page-text =" tableSettings.itemsPerPageText"
27
28
:last-icon =" tableSettings.lastIcon"
28
- :last-page-label =" tableSettings.lastPageLabel"
29
29
:level =" tableSettings.level"
30
30
:levels =" tableSettings.levels"
31
31
:loader-height =" tableSettings.loaderHeight"
43
43
:prev-page-label =" tableSettings.prevPageLabel"
44
44
:search-debounce =" tableSettings.searchDebounce"
45
45
:search-max-wait =" tableSettings.searchMaxWait"
46
+ :select-strategy =" tableSettings.selectStrategy"
46
47
:server =" tableSettings.server"
47
48
:show-current-page =" tableSettings.showCurrentPage"
48
49
:show-expand =" tableSettings.showExpand"
49
50
:show-footer-row =" tableSettings.showFooterRow"
50
51
:show-search =" tableSettings.showSearch"
51
52
:show-select =" tableSettings.showSelect"
52
53
:skelton-type =" tableSettings.skeltonType"
54
+ :sort-asc-icon =" tableSettings.sortAscIcon"
53
55
:sort-by =" tableSettings.sortBy"
54
- :sort-icon-asc =" tableSettings.sortAscIcon"
55
56
:tag =" tableSettings.tag"
56
57
:theme =" tableSettings.theme"
57
58
@update:drilldown =" fetchClientData($event)"
58
59
>
60
+ <!-- <template #loading>
61
+ [loading Slot]
62
+ </template> -->
63
+
64
+ <!-- <template #no-data>
65
+ [no-data Slot]
66
+ </template> -->
67
+
68
+ <!-- <template #top>
69
+ [top Slot]
70
+ </template> -->
71
+
72
+ <!-- <template
73
+ v-if="isServerSide"
74
+ #[`top.left`]
75
+ >
76
+ <v-col cols="4">
77
+ <v-text-field
78
+ v-model="tableSettings.search"
79
+ class="mt-0 pt-0"
80
+ density="compact"
81
+ hide-details
82
+ label="Search"
83
+ single-line
84
+ variant="outlined"
85
+ ></v-text-field>
86
+ </v-col>
87
+ </template> -->
88
+
89
+ <!-- <template #[`top.right`]="props">
90
+ <v-col
91
+ v-if="props.level === 1"
92
+ class="d-flex align-center justify-end"
93
+ >
94
+ {{ props.search }}
95
+ <v-btn
96
+ class="ms-2"
97
+ color="primary"
98
+ @click="props.toggleSelectAll()"
99
+ >Toggle Select</v-btn>
100
+ <v-btn
101
+ class="ms-2"
102
+ color="primary"
103
+ @click="props.selectAll(true)"
104
+ >Select All</v-btn>
105
+ <v-btn
106
+ class="ms-2"
107
+ color="primary"
108
+ @click="props.selectAll(false)"
109
+ >De-Select All</v-btn>
110
+ </v-col>
111
+ </template> -->
112
+
113
+ <!-- <template #[`header.data-table-select`]>
114
+ <div class="d-flex justify-center">
115
+ <v-icon>mdi mdi-vuetify</v-icon>
116
+ </div>
117
+ </template> -->
118
+
119
+ <!-- <template #[`header.sortIcon`]>
120
+ <fa-icon icon="fa-solid fa-arrow-up"></fa-icon>
121
+ </template> -->
122
+
123
+ <!-- <template #[`header.id`]="{ column }">
124
+ [header cell Slot]: slot {{ column.title }}
125
+ </template> -->
126
+
127
+ <!-- <template #thead="props">
128
+ <thead>
129
+ <tr>
130
+ <td
131
+ v-for="column in props.columns"
132
+ :key="column"
133
+ >
134
+ {{ column.title }}
135
+ </td>
136
+ </tr>
137
+ </thead>
138
+ </template> -->
139
+
140
+ <!-- <template #body>
141
+ [body Slot]
142
+ </template> -->
143
+
144
+ <!-- <template #tbody="{ props }">
145
+ <tbody>
146
+ <tr>
147
+ <td :colspan="Object.keys(tableSettings.headers.users).length">
148
+ [tbody Slot] {{ props }}
149
+ </td>
150
+ </tr>
151
+ </tbody>
152
+ </template> -->
153
+
154
+ <!-- <template #[`item.id`]="{ item }">
155
+ [item cell Slot]: {{ item.raw.id }}
156
+ </template> -->
157
+
158
+ <!-- <template #[`item.data-table-select`]>
159
+ <v-icon>mdi mdi-vuetify</v-icon>
160
+ </template> -->
161
+
162
+ <!-- <template #[`item.data-table-expand`]>
163
+ <fa-icon icon="fa-solid fa-chevron-down"></fa-icon>
164
+ </template> -->
165
+
166
+ <!-- <template #tfoot="props">
167
+ <tfoot>
168
+ <tr>
169
+ <td
170
+ v-for="column in props.columns"
171
+ :key="column"
172
+ >
173
+ {{ column.title }}
174
+ </td>
175
+ </tr>
176
+ </tfoot>
177
+ </template> -->
178
+
179
+ <!-- <template #[`tfoot.name`]>
180
+ <td>
181
+ [tfoot Slot]
182
+ </td>
183
+ </template> -->
184
+
185
+ <!-- <template #bottom>
186
+ [bottom Slot]
187
+ </template> -->
188
+
189
+ <!-- <template #[`footer.prepend`]>
190
+ <div class="me-2">
191
+ [footer.prepend Slot]
192
+ </div>
193
+ </template> -->
59
194
</VDrilldownTable >
60
195
</v-col >
61
196
</template >
@@ -84,6 +219,7 @@ const props = defineProps({
84
219
},
85
220
});
86
221
222
+ const selected = ref ([]);
87
223
88
224
const classes = inject (' classes' );
89
225
const tableSettings = ref ({ ... props .settings , ... props .colors });
@@ -144,6 +280,10 @@ const headers = {
144
280
},
145
281
],
146
282
users: [
283
+ // {
284
+ // key: 'data-table-select',
285
+ // title: '',
286
+ // },
147
287
{
148
288
align: ' start' ,
149
289
key: ' id' ,
@@ -153,11 +293,17 @@ const headers = {
153
293
{
154
294
align: ' start' ,
155
295
key: ' name' ,
296
+ renderer (value ) {
297
+ return value;
298
+ },
156
299
title: ' Name' ,
157
300
},
158
301
{
159
302
align: ' start' ,
160
303
key: ' email' ,
304
+ renderItem (value ) {
305
+ return ` <a href="mailto:${ value} ">${ value} </a>` ;
306
+ },
161
307
title: ' Email' ,
162
308
},
163
309
{
@@ -221,9 +367,16 @@ const footers = {
221
367
},
222
368
],
223
369
users: [
370
+ // {
371
+ // key: 'data-table-select',
372
+ // title: '',
373
+ // },
224
374
{
225
375
align: ' start' ,
226
376
key: ' id' ,
377
+ renderFooter () {
378
+ return ' ' ;
379
+ },
227
380
title: ' User ID' ,
228
381
width: 350 ,
229
382
},
0 commit comments