File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
packages/components-vue/src/components/table Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
2
<tbody v-if =" nodes.length" :class =" classes" >
3
3
<template v-for =" (node , nodeIndex ) in nodes " :key =" nodeIndex " >
4
+ <!-- Row -->
4
5
<tr
5
6
class =" --txtAlign"
6
7
:class =" [`--txtSize-${size}`, { ['is--selected']: selectedNodes[nodeIndex][0] }]"
7
8
>
8
9
<th
9
- v-if =" nodes.length > 1"
10
+ v-if =" nodes.length > 1 || $slots.default "
10
11
class =" --sticky"
11
12
:class =" { ['is--selected']: !!ordering['id'] }"
12
13
data-column-name =" id"
174
175
</div >
175
176
</th >
176
177
</tr >
178
+ <!-- Row children (Nested table) -->
177
179
<template v-if =" $slots .default " >
180
+ <!-- Row children content -->
178
181
<tr class =" no--hover --width-100" >
179
182
<td :colspan =" propertiesMeta.length + 2" >
180
183
<div
194
197
</div >
195
198
</td >
196
199
</tr >
200
+ <!-- Row children actions (Acts as a divider of rows when children are hidden) -->
197
201
<tr class =" no--hover" >
198
202
<th class =" --sticky --pX-10 --pY-5 --vAlign" >
199
203
<div class =" flx --flxRow --flx-end-center --gap-10 --bdr" >
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<thead >
3
+ <!-- Action bar -->
3
4
<tr
4
5
v-if =" (!isReadOnly && nodes.length > 1) || withDefaultSlot || $slots.headActions"
5
6
class =" no--hover"
91
92
</table >
92
93
</td >
93
94
</tr >
95
+ <!-- Table header -->
94
96
<tr v-if =" nodes.length" class =" --txtAlign" :class =" `--txtSize-${size}`" >
95
97
<!-- TODO: define filters, filter table contents -->
96
98
<th
97
- v-if =" nodes.length > 1"
99
+ v-if =" nodes.length > 1 || withDefaultSlot "
98
100
class =" --sticky"
99
101
:class =" { ['is--selected']: sort && !!ordering['id'] }"
100
102
data-column-name =" id"
You can’t perform that action at this time.
0 commit comments