@dataloop-ai/components 0.18.107 → 0.18.108
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/package.json
CHANGED
|
@@ -154,113 +154,120 @@
|
|
|
154
154
|
</template>
|
|
155
155
|
<template v-else>
|
|
156
156
|
<template v-if="dlTableRef && !isEmpty">
|
|
157
|
-
<
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
dlTableRef.getBodyScope({
|
|
163
|
-
key: getRowKey(row),
|
|
164
|
-
row,
|
|
165
|
-
pageIndex,
|
|
166
|
-
trClass: isRowSelected(getRowKey(row))
|
|
167
|
-
? 'selected'
|
|
168
|
-
: ''
|
|
169
|
-
})
|
|
170
|
-
"
|
|
171
|
-
>
|
|
172
|
-
<DlTrTreeView
|
|
173
|
-
v-for="(row, rowIndex) in computedRows"
|
|
174
|
-
:key="rowIndex"
|
|
175
|
-
:row="row"
|
|
176
|
-
:row-index="rowIndex"
|
|
177
|
-
:row-key="rowKey"
|
|
178
|
-
:is-row-selected="
|
|
179
|
-
isRowSelected(rowKey, getRowKey(row))
|
|
180
|
-
? 'selected'
|
|
181
|
-
: ''
|
|
182
|
-
"
|
|
183
|
-
:has-any-action="dlTableRef.hasAnyAction"
|
|
184
|
-
:no-hover="dlTableRef.noHover"
|
|
185
|
-
:has-draggable-rows="
|
|
186
|
-
dlTableRef.hasDraggableRows
|
|
187
|
-
"
|
|
188
|
-
:has-selection-mode="
|
|
189
|
-
dlTableRef.hasSelectionMode
|
|
190
|
-
"
|
|
191
|
-
:bind-body-selection="
|
|
192
|
-
dlTableRef.getBodySelectionScope({
|
|
157
|
+
<template v-for="(row, rowIndex) in computedRows">
|
|
158
|
+
<slot
|
|
159
|
+
name="row-body"
|
|
160
|
+
v-bind="
|
|
161
|
+
dlTableRef.getBodyScope({
|
|
193
162
|
key: getRowKey(row),
|
|
194
163
|
row,
|
|
195
|
-
pageIndex
|
|
164
|
+
pageIndex,
|
|
165
|
+
trClass: isRowSelected(getRowKey(row))
|
|
166
|
+
? 'selected'
|
|
167
|
+
: ''
|
|
196
168
|
})
|
|
197
169
|
"
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
170
|
+
>
|
|
171
|
+
<DlTrTreeView
|
|
172
|
+
:key="rowIndex"
|
|
173
|
+
:row="row"
|
|
174
|
+
:row-index="rowIndex"
|
|
175
|
+
:row-key="rowKey"
|
|
176
|
+
:is-row-selected="
|
|
177
|
+
isRowSelected(rowKey, getRowKey(row))
|
|
178
|
+
? 'selected'
|
|
179
|
+
: ''
|
|
180
|
+
"
|
|
181
|
+
:has-any-action="dlTableRef.hasAnyAction"
|
|
182
|
+
:no-hover="dlTableRef.noHover"
|
|
183
|
+
:has-draggable-rows="
|
|
184
|
+
dlTableRef.hasDraggableRows
|
|
185
|
+
"
|
|
186
|
+
:has-selection-mode="
|
|
187
|
+
dlTableRef.hasSelectionMode
|
|
188
|
+
"
|
|
189
|
+
:bind-body-selection="
|
|
190
|
+
dlTableRef.getBodySelectionScope({
|
|
201
191
|
key: getRowKey(row),
|
|
202
192
|
row,
|
|
203
|
-
pageIndex: rowIndex
|
|
204
|
-
col
|
|
193
|
+
pageIndex: rowIndex
|
|
205
194
|
})
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
:computed-rows="computedRows"
|
|
211
|
-
:model-value="
|
|
212
|
-
isRowSelected(rowKey, getRowKey(row))
|
|
213
|
-
"
|
|
214
|
-
@update:model-value="
|
|
215
|
-
(adding, evt) =>
|
|
216
|
-
updateSelectionHierarchy(
|
|
217
|
-
adding,
|
|
218
|
-
evt,
|
|
219
|
-
row
|
|
220
|
-
)
|
|
221
|
-
"
|
|
222
|
-
@rowClick="
|
|
223
|
-
dlTableRef.onTrClick($event, row, rowIndex)
|
|
224
|
-
"
|
|
225
|
-
@rowDoubleClick="
|
|
226
|
-
dlTableRef.onTrDblClick(
|
|
227
|
-
$event,
|
|
228
|
-
row,
|
|
229
|
-
rowIndex
|
|
230
|
-
)
|
|
231
|
-
"
|
|
232
|
-
@rowContextMenu="
|
|
233
|
-
dlTableRef.onTrContextMenu(
|
|
234
|
-
$event,
|
|
235
|
-
row,
|
|
236
|
-
rowIndex
|
|
237
|
-
)
|
|
238
|
-
"
|
|
239
|
-
@updateExpandedRow="
|
|
240
|
-
updateExpandedRow(
|
|
241
|
-
!row.expanded,
|
|
242
|
-
getRowKey(row)
|
|
243
|
-
)
|
|
244
|
-
"
|
|
245
|
-
>
|
|
246
|
-
<template
|
|
247
|
-
v-for="templateCol in dlTableRef.computedCols"
|
|
248
|
-
#[getSlotByName(templateCol.name)]
|
|
249
|
-
>
|
|
250
|
-
<slot
|
|
251
|
-
:name="getSlotByName(templateCol.name)"
|
|
252
|
-
v-bind="
|
|
253
|
-
dlTableRef.getBodySelectionScope({
|
|
195
|
+
"
|
|
196
|
+
:bind-body-cell-scope="
|
|
197
|
+
(col) =>
|
|
198
|
+
dlTableRef.getBodyCellScope({
|
|
254
199
|
key: getRowKey(row),
|
|
255
200
|
row,
|
|
256
|
-
|
|
257
|
-
|
|
201
|
+
pageIndex: rowIndex,
|
|
202
|
+
col
|
|
258
203
|
})
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
204
|
+
"
|
|
205
|
+
:color="color"
|
|
206
|
+
:computed-cols="dlTableRef.computedCols"
|
|
207
|
+
:slot-name="dlTableRef.slotNames"
|
|
208
|
+
:computed-rows="computedRows"
|
|
209
|
+
:model-value="
|
|
210
|
+
isRowSelected(rowKey, getRowKey(row))
|
|
211
|
+
"
|
|
212
|
+
@update:model-value="
|
|
213
|
+
(adding, evt) =>
|
|
214
|
+
updateSelectionHierarchy(
|
|
215
|
+
adding,
|
|
216
|
+
evt,
|
|
217
|
+
row
|
|
218
|
+
)
|
|
219
|
+
"
|
|
220
|
+
@rowClick="
|
|
221
|
+
dlTableRef.onTrClick(
|
|
222
|
+
$event,
|
|
223
|
+
row,
|
|
224
|
+
rowIndex
|
|
225
|
+
)
|
|
226
|
+
"
|
|
227
|
+
@rowDoubleClick="
|
|
228
|
+
dlTableRef.onTrDblClick(
|
|
229
|
+
$event,
|
|
230
|
+
row,
|
|
231
|
+
rowIndex
|
|
232
|
+
)
|
|
233
|
+
"
|
|
234
|
+
@rowContextMenu="
|
|
235
|
+
dlTableRef.onTrContextMenu(
|
|
236
|
+
$event,
|
|
237
|
+
row,
|
|
238
|
+
rowIndex
|
|
239
|
+
)
|
|
240
|
+
"
|
|
241
|
+
@updateExpandedRow="
|
|
242
|
+
updateExpandedRow(
|
|
243
|
+
!row.expanded,
|
|
244
|
+
getRowKey(row)
|
|
245
|
+
)
|
|
246
|
+
"
|
|
247
|
+
>
|
|
248
|
+
<template
|
|
249
|
+
v-for="templateCol in dlTableRef.computedCols"
|
|
250
|
+
#[getSlotByName(templateCol.name)]
|
|
251
|
+
>
|
|
252
|
+
<slot
|
|
253
|
+
:name="
|
|
254
|
+
getSlotByName(templateCol.name)
|
|
255
|
+
"
|
|
256
|
+
v-bind="
|
|
257
|
+
dlTableRef.getBodySelectionScope(
|
|
258
|
+
{
|
|
259
|
+
key: getRowKey(row),
|
|
260
|
+
row,
|
|
261
|
+
col: templateCol,
|
|
262
|
+
pageIndex: rowIndex
|
|
263
|
+
}
|
|
264
|
+
)
|
|
265
|
+
"
|
|
266
|
+
/>
|
|
267
|
+
</template>
|
|
268
|
+
</DlTrTreeView>
|
|
269
|
+
</slot>
|
|
270
|
+
</template>
|
|
264
271
|
</template>
|
|
265
272
|
</template>
|
|
266
273
|
</slot>
|
|
@@ -278,7 +285,8 @@ import {
|
|
|
278
285
|
defineComponent,
|
|
279
286
|
isVue2,
|
|
280
287
|
set,
|
|
281
|
-
ref
|
|
288
|
+
ref,
|
|
289
|
+
h
|
|
282
290
|
} from 'vue-demi'
|
|
283
291
|
import { DlTable } from '../../../components'
|
|
284
292
|
import DlTrTreeView from './views/DlTrTreeView.vue'
|
|
@@ -190,6 +190,7 @@
|
|
|
190
190
|
class="sticky-header"
|
|
191
191
|
:separator="separator"
|
|
192
192
|
:columns="tableColumns"
|
|
193
|
+
:rows="tableRows"
|
|
193
194
|
color="dl-color-secondary"
|
|
194
195
|
style="height: 500px"
|
|
195
196
|
>
|
|
@@ -741,7 +742,6 @@ export default defineComponent({
|
|
|
741
742
|
const onRowClick = (item: any) => {
|
|
742
743
|
// console.log('onRowClick TreeTableDemo: ', item)
|
|
743
744
|
}
|
|
744
|
-
|
|
745
745
|
return {
|
|
746
746
|
filter,
|
|
747
747
|
selectedData,
|