evui 3.3.11 → 3.3.12
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/evui.common.js +807 -341
- package/dist/evui.common.js.map +1 -1
- package/dist/evui.umd.js +807 -341
- package/dist/evui.umd.js.map +1 -1
- package/dist/evui.umd.min.js +1 -1
- package/dist/evui.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/chart/element/element.line.js +20 -9
- package/src/components/chart/element/element.tip.js +69 -73
- package/src/components/chart/model/model.store.js +2 -2
- package/src/components/chart/plugins/plugins.interaction.js +6 -2
- package/src/components/chart/scale/scale.js +3 -12
- package/src/components/grid/grid.summary.vue +20 -6
- package/src/components/grid/uses.js +1 -1
- package/src/components/treeGrid/TreeGrid.vue +253 -34
- package/src/components/treeGrid/TreeGridNode.vue +8 -9
- package/src/components/treeGrid/uses.js +152 -37
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
v-if="
|
|
3
|
+
v-if="$slots.toolbar"
|
|
4
4
|
class="toolbar-wrapper"
|
|
5
5
|
:style="`width: ${gridWidth};`"
|
|
6
6
|
>
|
|
7
7
|
<!-- Toolbar -->
|
|
8
|
-
<toolbar
|
|
8
|
+
<toolbar>
|
|
9
9
|
<template #toolbarWrapper>
|
|
10
10
|
<slot
|
|
11
11
|
name="toolbar"
|
|
12
12
|
:item="{
|
|
13
13
|
onSearch,
|
|
14
14
|
}"
|
|
15
|
-
|
|
16
|
-
</slot>
|
|
15
|
+
/>
|
|
17
16
|
</template>
|
|
18
17
|
</toolbar>
|
|
19
18
|
</div>
|
|
@@ -26,20 +25,20 @@
|
|
|
26
25
|
}"
|
|
27
26
|
:style="gridStyle"
|
|
28
27
|
>
|
|
29
|
-
<!--Table-->
|
|
28
|
+
<!-- Table -->
|
|
30
29
|
<div
|
|
31
30
|
v-cloak
|
|
32
31
|
ref="grid"
|
|
33
32
|
:class="gridClass"
|
|
34
33
|
>
|
|
35
|
-
<!--Header-->
|
|
34
|
+
<!-- Header -->
|
|
36
35
|
<div
|
|
37
36
|
v-show="showHeader"
|
|
38
37
|
ref="header"
|
|
39
38
|
:class="headerClass"
|
|
40
39
|
>
|
|
41
40
|
<ul class="column-list">
|
|
42
|
-
<!--Header Checkbox-->
|
|
41
|
+
<!-- Header Checkbox -->
|
|
43
42
|
<li
|
|
44
43
|
v-if="useCheckbox.use"
|
|
45
44
|
:class="headerCheckboxClass"
|
|
@@ -51,7 +50,7 @@
|
|
|
51
50
|
@change="onCheckAll"
|
|
52
51
|
/>
|
|
53
52
|
</li>
|
|
54
|
-
<!--Column List-->
|
|
53
|
+
<!-- Column List -->
|
|
55
54
|
<template
|
|
56
55
|
v-for="(column, index) in orderedColumns"
|
|
57
56
|
:key="index"
|
|
@@ -62,14 +61,14 @@
|
|
|
62
61
|
:class="getColumnClass(column)"
|
|
63
62
|
:style="getColumnStyle(column)"
|
|
64
63
|
>
|
|
65
|
-
<!--Column Name-->
|
|
64
|
+
<!-- Column Name -->
|
|
66
65
|
<span
|
|
67
66
|
:title="column.caption"
|
|
68
67
|
class="column-name"
|
|
69
68
|
>
|
|
70
69
|
{{ column.caption }}
|
|
71
70
|
</span>
|
|
72
|
-
<!--Column Resize-->
|
|
71
|
+
<!-- Column Resize -->
|
|
73
72
|
<span
|
|
74
73
|
class="column-resize"
|
|
75
74
|
@mousedown.stop.left="onColumnResize(index, $event)"
|
|
@@ -78,7 +77,7 @@
|
|
|
78
77
|
</template>
|
|
79
78
|
</ul>
|
|
80
79
|
</div>
|
|
81
|
-
<!--Body-->
|
|
80
|
+
<!-- Body -->
|
|
82
81
|
<div
|
|
83
82
|
ref="body"
|
|
84
83
|
:class="bodyStyle"
|
|
@@ -86,7 +85,7 @@
|
|
|
86
85
|
@contextmenu="onContextMenu($event)"
|
|
87
86
|
@contextmenu.prevent="menu.show"
|
|
88
87
|
>
|
|
89
|
-
<!--vScroll Top-->
|
|
88
|
+
<!-- vScroll Top -->
|
|
90
89
|
<div
|
|
91
90
|
:style="`height: ${vScrollTopHeight}px;`"
|
|
92
91
|
class="vscroll-spacer"
|
|
@@ -114,7 +113,7 @@
|
|
|
114
113
|
@click-tree-data="onRowClick"
|
|
115
114
|
@dbl-click-tree-data="onRowDblClick"
|
|
116
115
|
>
|
|
117
|
-
<!--
|
|
116
|
+
<!-- Cell Renderer -->
|
|
118
117
|
<template
|
|
119
118
|
v-for="(column, cellIndex) in orderedColumns"
|
|
120
119
|
:key="cellIndex"
|
|
@@ -131,7 +130,9 @@
|
|
|
131
130
|
</slot>
|
|
132
131
|
</template>
|
|
133
132
|
<template v-else>
|
|
134
|
-
<span :title="node[column.field]">
|
|
133
|
+
<span :title="getConvertValue(column, node[column.field])">
|
|
134
|
+
{{ getConvertValue(column, node[column.field]) }}
|
|
135
|
+
</span>
|
|
135
136
|
</template>
|
|
136
137
|
</template>
|
|
137
138
|
</tree-grid-node>
|
|
@@ -140,18 +141,18 @@
|
|
|
140
141
|
</tr>
|
|
141
142
|
</tbody>
|
|
142
143
|
</table>
|
|
143
|
-
<!--vScroll Bottom-->
|
|
144
|
+
<!-- vScroll Bottom -->
|
|
144
145
|
<div
|
|
145
146
|
:style="`height: ${vScrollBottomHeight}px;`"
|
|
146
147
|
class="vscroll-spacer"
|
|
147
148
|
/>
|
|
148
|
-
<!--Context Menu-->
|
|
149
|
+
<!-- Context Menu -->
|
|
149
150
|
<ev-context-menu
|
|
150
151
|
ref="menu"
|
|
151
152
|
:items="contextMenuItems"
|
|
152
153
|
/>
|
|
153
154
|
</div>
|
|
154
|
-
<!--Resize Line-->
|
|
155
|
+
<!-- Resize Line -->
|
|
155
156
|
<div
|
|
156
157
|
v-show="showResizeLine"
|
|
157
158
|
ref="resizeLine"
|
|
@@ -159,12 +160,37 @@
|
|
|
159
160
|
/>
|
|
160
161
|
</div>
|
|
161
162
|
</div>
|
|
163
|
+
<!-- Summary -->
|
|
164
|
+
<grid-summary
|
|
165
|
+
v-if="useSummary"
|
|
166
|
+
:is-tree="true"
|
|
167
|
+
:ordered-columns="orderedColumns"
|
|
168
|
+
:stores="stores"
|
|
169
|
+
:use-checkbox="useCheckbox.use"
|
|
170
|
+
:style-option="{
|
|
171
|
+
borderStyle,
|
|
172
|
+
minWidth,
|
|
173
|
+
rowHeight,
|
|
174
|
+
}"
|
|
175
|
+
/>
|
|
176
|
+
<!-- Pagination -->
|
|
177
|
+
<grid-pagination
|
|
178
|
+
v-if="usePage && !isInfinite"
|
|
179
|
+
v-model="currentPage"
|
|
180
|
+
:total="showTreeStore.length"
|
|
181
|
+
:per-page="perPage"
|
|
182
|
+
:visible-page="visiblePage"
|
|
183
|
+
:show-page-info="showPageInfo"
|
|
184
|
+
:order="order"
|
|
185
|
+
/>
|
|
162
186
|
</template>
|
|
163
187
|
|
|
164
188
|
<script>
|
|
165
189
|
import { reactive, toRefs, computed, watch, onMounted, onActivated, nextTick } from 'vue';
|
|
166
190
|
import treeGridNode from './TreeGridNode';
|
|
167
191
|
import Toolbar from './treeGrid.toolbar';
|
|
192
|
+
import GridPagination from '../grid/grid.pagination';
|
|
193
|
+
import GridSummary from '../grid/grid.summary';
|
|
168
194
|
import {
|
|
169
195
|
commonFunctions,
|
|
170
196
|
scrollEvent,
|
|
@@ -174,6 +200,7 @@ import {
|
|
|
174
200
|
contextMenuEvent,
|
|
175
201
|
treeEvent,
|
|
176
202
|
filterEvent,
|
|
203
|
+
pagingEvent,
|
|
177
204
|
} from './uses';
|
|
178
205
|
|
|
179
206
|
export default {
|
|
@@ -181,6 +208,8 @@ export default {
|
|
|
181
208
|
components: {
|
|
182
209
|
treeGridNode,
|
|
183
210
|
Toolbar,
|
|
211
|
+
GridPagination,
|
|
212
|
+
GridSummary,
|
|
184
213
|
},
|
|
185
214
|
props: {
|
|
186
215
|
columns: {
|
|
@@ -200,8 +229,8 @@ export default {
|
|
|
200
229
|
default: '100%',
|
|
201
230
|
},
|
|
202
231
|
selected: {
|
|
203
|
-
type: [Array
|
|
204
|
-
default:
|
|
232
|
+
type: [Array],
|
|
233
|
+
default: () => [],
|
|
205
234
|
},
|
|
206
235
|
checked: {
|
|
207
236
|
type: [Array],
|
|
@@ -227,8 +256,10 @@ export default {
|
|
|
227
256
|
'update:checked': null,
|
|
228
257
|
'check-row': null,
|
|
229
258
|
'check-all': null,
|
|
259
|
+
'page-change': null,
|
|
230
260
|
},
|
|
231
261
|
setup(props) {
|
|
262
|
+
const useSummary = computed(() => (props.option?.useSummary || false));
|
|
232
263
|
const elementInfo = reactive({
|
|
233
264
|
body: null,
|
|
234
265
|
header: null,
|
|
@@ -243,6 +274,7 @@ export default {
|
|
|
243
274
|
treeStore: [],
|
|
244
275
|
viewStore: [],
|
|
245
276
|
filterStore: [],
|
|
277
|
+
pagingStore: [],
|
|
246
278
|
treeRows: props.rows,
|
|
247
279
|
searchStore: computed(() => stores.treeStore.filter(item => item.isFilter)),
|
|
248
280
|
showTreeStore: computed(() => stores.treeStore.filter(item => item.show)),
|
|
@@ -250,6 +282,23 @@ export default {
|
|
|
250
282
|
props.columns.map((column, index) => ({ index, ...column }))),
|
|
251
283
|
store: computed(() => (filterInfo.isSearch ? stores.searchStore : stores.treeStore)),
|
|
252
284
|
});
|
|
285
|
+
const pageInfo = reactive({
|
|
286
|
+
usePage: computed(() => (props.option.page?.use || false)),
|
|
287
|
+
useClient: props.option.page?.useClient || false,
|
|
288
|
+
isInfinite: computed(() => (props.option.page?.isInfinite || false)),
|
|
289
|
+
startIndex: 0,
|
|
290
|
+
prevPage: 0,
|
|
291
|
+
currentPage: 0,
|
|
292
|
+
total: computed(() => (props.option.page?.total || 0)),
|
|
293
|
+
perPage: computed(() => (props.option.page?.perPage || 20)),
|
|
294
|
+
visiblePage: computed(() => (props.option.page?.visiblePage || 8)),
|
|
295
|
+
order: computed(() => (props.option.page?.order || 'center')),
|
|
296
|
+
showPageInfo: computed(() => (props.option.page?.showPageInfo || false)),
|
|
297
|
+
isClientPaging: computed(() =>
|
|
298
|
+
pageInfo.useClient && pageInfo.usePage && !pageInfo.isInfinite),
|
|
299
|
+
isHighlight: false,
|
|
300
|
+
highlightPage: 0,
|
|
301
|
+
});
|
|
253
302
|
const checkInfo = reactive({
|
|
254
303
|
prevCheckedRow: [],
|
|
255
304
|
isHeaderChecked: false,
|
|
@@ -274,8 +323,14 @@ export default {
|
|
|
274
323
|
hasVerticalScrollBar: false,
|
|
275
324
|
});
|
|
276
325
|
const selectInfo = reactive({
|
|
277
|
-
useSelect: props.option.useSelect === undefined ? true : props.option.useSelect,
|
|
278
326
|
selectedRow: props.selected,
|
|
327
|
+
useSelect: computed(() => props.option?.useSelection?.use ?? true),
|
|
328
|
+
limitCount: computed(() => {
|
|
329
|
+
let limit = props.option?.useSelection?.limitCount;
|
|
330
|
+
limit = !!limit && limit >= 2 ? limit : 0;
|
|
331
|
+
return limit;
|
|
332
|
+
}),
|
|
333
|
+
multiple: computed(() => props.option?.useSelection?.multiple ?? false),
|
|
279
334
|
});
|
|
280
335
|
const contextInfo = reactive({
|
|
281
336
|
menu: null,
|
|
@@ -299,13 +354,45 @@ export default {
|
|
|
299
354
|
(props.option.showHeader === undefined ? true : props.option.showHeader)),
|
|
300
355
|
stripeStyle: computed(() => props.option.style?.stripe || false),
|
|
301
356
|
borderStyle: computed(() => props.option.style?.border || ''),
|
|
302
|
-
highlightIdx: computed(() => props.option.style?.highlight),
|
|
357
|
+
highlightIdx: computed(() => props.option.style?.highlight ?? -1),
|
|
358
|
+
});
|
|
359
|
+
const clearSelectInfo = () => {
|
|
360
|
+
selectInfo.selectedRow.length = 0;
|
|
361
|
+
stores.store.forEach((row) => {
|
|
362
|
+
row.selected = false;
|
|
363
|
+
});
|
|
364
|
+
};
|
|
365
|
+
const clearCheckInfo = () => {
|
|
366
|
+
checkInfo.isHeaderChecked = false;
|
|
367
|
+
checkInfo.checkedRows.length = 0;
|
|
368
|
+
stores.store.forEach((row) => {
|
|
369
|
+
row.checked = false;
|
|
370
|
+
});
|
|
371
|
+
};
|
|
372
|
+
const {
|
|
373
|
+
getPagingData,
|
|
374
|
+
updatePagingInfo,
|
|
375
|
+
changePage,
|
|
376
|
+
} = pagingEvent({
|
|
377
|
+
stores,
|
|
378
|
+
pageInfo,
|
|
379
|
+
filterInfo,
|
|
380
|
+
elementInfo,
|
|
381
|
+
clearCheckInfo,
|
|
303
382
|
});
|
|
304
383
|
const {
|
|
305
384
|
updateVScroll,
|
|
306
385
|
updateHScroll,
|
|
307
386
|
onScroll,
|
|
308
|
-
} = scrollEvent({
|
|
387
|
+
} = scrollEvent({
|
|
388
|
+
scrollInfo,
|
|
389
|
+
stores,
|
|
390
|
+
elementInfo,
|
|
391
|
+
resizeInfo,
|
|
392
|
+
pageInfo,
|
|
393
|
+
getPagingData,
|
|
394
|
+
updatePagingInfo,
|
|
395
|
+
});
|
|
309
396
|
|
|
310
397
|
const {
|
|
311
398
|
onRowClick,
|
|
@@ -315,14 +402,28 @@ export default {
|
|
|
315
402
|
const {
|
|
316
403
|
onCheck,
|
|
317
404
|
onCheckAll,
|
|
318
|
-
} = checkEvent({
|
|
405
|
+
} = checkEvent({
|
|
406
|
+
checkInfo,
|
|
407
|
+
stores,
|
|
408
|
+
checkHeader,
|
|
409
|
+
pageInfo,
|
|
410
|
+
getPagingData,
|
|
411
|
+
updatePagingInfo,
|
|
412
|
+
});
|
|
319
413
|
|
|
320
414
|
const {
|
|
321
415
|
calculatedColumn,
|
|
322
416
|
onResize,
|
|
323
417
|
onShow,
|
|
324
418
|
onColumnResize,
|
|
325
|
-
} = resizeEvent({
|
|
419
|
+
} = resizeEvent({
|
|
420
|
+
resizeInfo,
|
|
421
|
+
elementInfo,
|
|
422
|
+
checkInfo,
|
|
423
|
+
stores,
|
|
424
|
+
isRenderer,
|
|
425
|
+
updateVScroll,
|
|
426
|
+
});
|
|
326
427
|
|
|
327
428
|
const {
|
|
328
429
|
setContextMenu,
|
|
@@ -336,7 +437,16 @@ export default {
|
|
|
336
437
|
|
|
337
438
|
const {
|
|
338
439
|
onSearch,
|
|
339
|
-
} = filterEvent({
|
|
440
|
+
} = filterEvent({
|
|
441
|
+
stores,
|
|
442
|
+
filterInfo,
|
|
443
|
+
pageInfo,
|
|
444
|
+
getConvertValue,
|
|
445
|
+
onResize,
|
|
446
|
+
checkHeader,
|
|
447
|
+
getPagingData,
|
|
448
|
+
updatePagingInfo,
|
|
449
|
+
});
|
|
340
450
|
|
|
341
451
|
onMounted(() => {
|
|
342
452
|
stores.treeStore = setTreeNodeStore();
|
|
@@ -344,10 +454,14 @@ export default {
|
|
|
344
454
|
onActivated(() => {
|
|
345
455
|
onResize();
|
|
346
456
|
});
|
|
457
|
+
|
|
347
458
|
watch(
|
|
348
459
|
() => props.checked,
|
|
349
460
|
(checkedList) => {
|
|
350
|
-
|
|
461
|
+
let store = stores.store;
|
|
462
|
+
if (pageInfo.isClientPaging) {
|
|
463
|
+
store = getPagingData();
|
|
464
|
+
}
|
|
351
465
|
checkInfo.checkedRows = checkedList;
|
|
352
466
|
checkInfo.isHeaderChecked = false;
|
|
353
467
|
if (store.length) {
|
|
@@ -361,8 +475,70 @@ export default {
|
|
|
361
475
|
);
|
|
362
476
|
watch(
|
|
363
477
|
() => props.selected,
|
|
364
|
-
(
|
|
365
|
-
selectInfo.selectedRow =
|
|
478
|
+
(selectedList) => {
|
|
479
|
+
selectInfo.selectedRow = selectedList;
|
|
480
|
+
stores.store.forEach((row) => {
|
|
481
|
+
row.selected = !!selectInfo.selectedRow.find(s => s.index === row.index);
|
|
482
|
+
});
|
|
483
|
+
updateVScroll();
|
|
484
|
+
}, { deep: true },
|
|
485
|
+
);
|
|
486
|
+
watch(
|
|
487
|
+
() => styleInfo.highlightIdx,
|
|
488
|
+
async (index) => {
|
|
489
|
+
await nextTick();
|
|
490
|
+
const setChildShow = (data) => {
|
|
491
|
+
if (!data?.children) {
|
|
492
|
+
return;
|
|
493
|
+
}
|
|
494
|
+
const { children } = data;
|
|
495
|
+
children.forEach((node) => {
|
|
496
|
+
const childNode = node;
|
|
497
|
+
if (childNode.parent.show && childNode.parent.expand) {
|
|
498
|
+
childNode.show = true;
|
|
499
|
+
} else {
|
|
500
|
+
childNode.show = false;
|
|
501
|
+
}
|
|
502
|
+
childNode.isFilter = true;
|
|
503
|
+
if (childNode.hasChild) {
|
|
504
|
+
setChildShow(childNode);
|
|
505
|
+
}
|
|
506
|
+
});
|
|
507
|
+
};
|
|
508
|
+
const setParentShow = (data) => {
|
|
509
|
+
if (!data?.parent) {
|
|
510
|
+
return;
|
|
511
|
+
}
|
|
512
|
+
const { parent } = data;
|
|
513
|
+
parent.show = true;
|
|
514
|
+
parent.isFilter = true;
|
|
515
|
+
parent.expand = true;
|
|
516
|
+
setChildShow(parent);
|
|
517
|
+
setParentShow(parent);
|
|
518
|
+
};
|
|
519
|
+
if (index >= 0) {
|
|
520
|
+
const highlightNode = stores.store.find(node => node.index === index);
|
|
521
|
+
if (!highlightNode) {
|
|
522
|
+
return;
|
|
523
|
+
}
|
|
524
|
+
// highlightNode parents 자동 펼치기
|
|
525
|
+
highlightNode.show = true;
|
|
526
|
+
highlightNode.isFilter = true;
|
|
527
|
+
setParentShow(highlightNode);
|
|
528
|
+
if (pageInfo.usePage && !pageInfo.isInfinite) {
|
|
529
|
+
const highlightNodeIndex = (stores.showTreeStore
|
|
530
|
+
.map(node => node.index)
|
|
531
|
+
.indexOf(highlightNode.index)
|
|
532
|
+
) + 1; // tree 에 보여지는 데이터 기준으로 index 다시 구하기
|
|
533
|
+
pageInfo.highlightPage = Math.ceil(highlightNodeIndex / pageInfo.perPage) || 1;
|
|
534
|
+
if (pageInfo.highlightPage !== pageInfo.currentPage) {
|
|
535
|
+
pageInfo.currentPage = pageInfo.highlightPage;
|
|
536
|
+
pageInfo.isHighlight = true;
|
|
537
|
+
return;
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
elementInfo.body.scrollTop = resizeInfo.rowHeight * styleInfo.highlightIdx;
|
|
541
|
+
}
|
|
366
542
|
},
|
|
367
543
|
);
|
|
368
544
|
watch(
|
|
@@ -372,6 +548,18 @@ export default {
|
|
|
372
548
|
checkInfo.isHeaderChecked = false;
|
|
373
549
|
},
|
|
374
550
|
);
|
|
551
|
+
watch(
|
|
552
|
+
() => selectInfo.useSelect,
|
|
553
|
+
() => {
|
|
554
|
+
clearSelectInfo();
|
|
555
|
+
},
|
|
556
|
+
);
|
|
557
|
+
watch(
|
|
558
|
+
() => selectInfo.multiple,
|
|
559
|
+
() => {
|
|
560
|
+
clearSelectInfo();
|
|
561
|
+
},
|
|
562
|
+
);
|
|
375
563
|
watch(
|
|
376
564
|
() => props.rows,
|
|
377
565
|
(newData) => {
|
|
@@ -408,10 +596,38 @@ export default {
|
|
|
408
596
|
nextTick(() => {
|
|
409
597
|
if (value !== undefined) {
|
|
410
598
|
onSearch(value?.value ?? value);
|
|
599
|
+
if (pageInfo.isClientPaging) {
|
|
600
|
+
clearCheckInfo();
|
|
601
|
+
clearSelectInfo();
|
|
602
|
+
}
|
|
411
603
|
}
|
|
412
604
|
});
|
|
413
605
|
}, { immediate: true },
|
|
414
606
|
);
|
|
607
|
+
watch(
|
|
608
|
+
() => props.option.page?.currentPage,
|
|
609
|
+
(value) => {
|
|
610
|
+
const current = !value ? 1 : value;
|
|
611
|
+
pageInfo.currentPage = !props.option.page?.isInfinite ? current : 1;
|
|
612
|
+
}, { immediate: true },
|
|
613
|
+
);
|
|
614
|
+
watch(
|
|
615
|
+
() => pageInfo.currentPage,
|
|
616
|
+
(current, before) => {
|
|
617
|
+
nextTick(() => {
|
|
618
|
+
changePage(before);
|
|
619
|
+
if (pageInfo.isClientPaging && current !== before) {
|
|
620
|
+
clearCheckInfo();
|
|
621
|
+
clearSelectInfo();
|
|
622
|
+
}
|
|
623
|
+
updateVScroll();
|
|
624
|
+
if (current === pageInfo.highlightPage && pageInfo.isHighlight) {
|
|
625
|
+
elementInfo.body.scrollTop = resizeInfo.rowHeight * styleInfo.highlightIdx;
|
|
626
|
+
pageInfo.isHighlight = !pageInfo.isHighlight;
|
|
627
|
+
}
|
|
628
|
+
});
|
|
629
|
+
},
|
|
630
|
+
);
|
|
415
631
|
const gridStyle = computed(() => ({
|
|
416
632
|
width: resizeInfo.gridWidth,
|
|
417
633
|
height: resizeInfo.gridHeight,
|
|
@@ -459,6 +675,14 @@ export default {
|
|
|
459
675
|
const getSlotName = column => `${column}Node`;
|
|
460
676
|
|
|
461
677
|
return {
|
|
678
|
+
gridStyle,
|
|
679
|
+
gridClass,
|
|
680
|
+
headerClass,
|
|
681
|
+
headerCheckboxClass,
|
|
682
|
+
isHeaderCheckbox,
|
|
683
|
+
bodyStyle,
|
|
684
|
+
useSummary,
|
|
685
|
+
stores,
|
|
462
686
|
...toRefs(styleInfo),
|
|
463
687
|
...toRefs(elementInfo),
|
|
464
688
|
...toRefs(stores),
|
|
@@ -468,6 +692,7 @@ export default {
|
|
|
468
692
|
...toRefs(selectInfo),
|
|
469
693
|
...toRefs(checkInfo),
|
|
470
694
|
...toRefs(contextInfo),
|
|
695
|
+
...toRefs(pageInfo),
|
|
471
696
|
isRenderer,
|
|
472
697
|
getComponentName,
|
|
473
698
|
getConvertValue,
|
|
@@ -488,15 +713,9 @@ export default {
|
|
|
488
713
|
onContextMenu,
|
|
489
714
|
onSearch,
|
|
490
715
|
handleExpand,
|
|
491
|
-
gridStyle,
|
|
492
|
-
gridClass,
|
|
493
|
-
headerClass,
|
|
494
|
-
headerCheckboxClass,
|
|
495
|
-
isHeaderCheckbox,
|
|
496
716
|
getColumnClass,
|
|
497
717
|
getColumnStyle,
|
|
498
718
|
getSlotName,
|
|
499
|
-
bodyStyle,
|
|
500
719
|
};
|
|
501
720
|
},
|
|
502
721
|
};
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
<td
|
|
27
27
|
v-if="!column.hide"
|
|
28
28
|
:data-name="column.field"
|
|
29
|
-
:data-index="
|
|
29
|
+
:data-index="node.index"
|
|
30
30
|
:class="getColumnClass(column, cellIndex)"
|
|
31
31
|
:style="getColumnStyle(column)"
|
|
32
32
|
>
|
|
@@ -83,8 +83,7 @@
|
|
|
83
83
|
:item="{
|
|
84
84
|
data: node.data,
|
|
85
85
|
}"
|
|
86
|
-
|
|
87
|
-
</slot>
|
|
86
|
+
/>
|
|
88
87
|
</template>
|
|
89
88
|
</div>
|
|
90
89
|
</td>
|
|
@@ -185,7 +184,7 @@ export default {
|
|
|
185
184
|
'tree-row': true,
|
|
186
185
|
[`tree-row--level-${nodeInfo?.level}`]: true,
|
|
187
186
|
highlight: nodeInfo?.index === props.highlightIndex,
|
|
188
|
-
selected: nodeInfo
|
|
187
|
+
selected: nodeInfo.selected,
|
|
189
188
|
'non-border': !!props.borderStyle && props.borderStyle !== 'rows',
|
|
190
189
|
});
|
|
191
190
|
const checkboxClass = computed(() => ({
|
|
@@ -213,17 +212,17 @@ export default {
|
|
|
213
212
|
};
|
|
214
213
|
};
|
|
215
214
|
return {
|
|
215
|
+
parentIconMV,
|
|
216
|
+
childIconMV,
|
|
217
|
+
node,
|
|
218
|
+
isDataIcon,
|
|
219
|
+
checkboxClass,
|
|
216
220
|
onCheck,
|
|
217
221
|
onExpand,
|
|
218
222
|
onClick,
|
|
219
223
|
onDblClick,
|
|
220
224
|
expandIconClasses,
|
|
221
|
-
parentIconMV,
|
|
222
|
-
childIconMV,
|
|
223
|
-
node,
|
|
224
|
-
isDataIcon,
|
|
225
225
|
getRowClass,
|
|
226
|
-
checkboxClass,
|
|
227
226
|
getColumnClass,
|
|
228
227
|
getColumnStyle,
|
|
229
228
|
getDepthStyle,
|