refactor: use slot name 'actions' in Table component
This commit is contained in:
parent
a458d4f850
commit
54a8445cd4
3 changed files with 40 additions and 35 deletions
|
@ -6,15 +6,16 @@
|
|||
:columns="['id', 'name', 'state', 'last_activity', 'assigned_to']"
|
||||
:items="tickets"
|
||||
:keyName="'id'"
|
||||
v-slot="{ item }"
|
||||
>
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-primary" :href="'/ticket/' + item.id" title="view"
|
||||
@click.prevent="gotoDetail(item)">
|
||||
<font-awesome-icon icon="eye"/>
|
||||
View
|
||||
</a>
|
||||
</div>
|
||||
<template #actions="{ item }">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-primary" :href="'/ticket/' + item.id" title="view"
|
||||
@click.prevent="gotoDetail(item)">
|
||||
<font-awesome-icon icon="eye"/>
|
||||
View
|
||||
</a>
|
||||
</div>
|
||||
</template>
|
||||
</Table>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue