use slot in table too

This commit is contained in:
j3d1 2019-12-24 14:40:01 +01:00
parent 52dcab03ba
commit 6290eee156
3 changed files with 18 additions and 20 deletions

View file

@ -24,16 +24,14 @@
>
</div>
</th>
<th>actions</th>
<th></th>
</tr>
</thead>
<tbody>
<tr v-for="item in internalItems" :key="item[keyName]" @click="$emit('itemActivated', item)">
<td v-for="(column, index) in columns" :key="index">{{ item[column] }}</td>
<td>
<div class="btn-group">
<button class="btn btn-outline-secondary" v-for="(action, a_index) in actions" :key="a_index" @click.stop="action.fun&&action.fun(item)" >{{action.name}}</button>
</div>
<slot v-bind:item="item"/>
</td>
</tr>
</tbody>