[Vuejs]-In Vuetify, how to add a button into each row in <v-data-table>?

5👍

You can add a header called action.

  { text: "", value: "action" }

And then specify the rendering of this header with a slot.

<v-data-table :headers="headers" :items="desserts">
  <template v-slot:item.action="{ item }">
    <v-btn>OPEN</v-btn>
  </template>
</v-data-table>

https://vuetifyjs.com/en/components/data-tables/#simple-checkbox

Leave a comment