Fixed id getting
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Pünkösd Marcell 2021-08-09 17:50:56 +02:00
parent 8a149201a5
commit ee438b8449

View File

@ -5,8 +5,8 @@
<!-- A virtual column --> <!-- A virtual column -->
<template #cell(actions)="data"> <template #cell(actions)="data">
<b-button class="mx-1" size="sm" variant="primary" @click="actionInfo(data.id)"><b-icon icon="info"/></b-button> <b-button class="mx-1" size="sm" variant="primary" @click="actionInfo(data)"><b-icon icon="info"/></b-button>
<b-button class="mx-1" size="sm" variant="danger" @click="actionDelete(data.id)"><b-icon icon="trash"/></b-button> <b-button class="mx-1" size="sm" variant="danger" @click="actionDelete(data)"><b-icon icon="trash"/></b-button>
</template> </template>
<template #table-busy> <template #table-busy>
@ -67,6 +67,12 @@ export default {
rowClass(item, type) { rowClass(item, type) {
if (!item || type !== 'row') return if (!item || type !== 'row') return
if (item.default) return 'table-info' if (item.default) return 'table-info'
},
actionDelete({item}) {
console.log(item.id);
},
actionInfo({item}) {
console.log(item.id);
} }
}, },
mounted() { mounted() {