Search code examples
vue.jsbuefy

How can I add b-table columns in buefy?


I am using buefy's b-table.

I wrote code like <b-table :data="movies">, but my movies only have a total of three values.

However, I would like to add the edit and delete buttons to a cell, including the information (3) of the movies in the table.

I unilaterally added the b-table-column, but the table line is cut off.

How can I solve this?


Solution

  • Try to add an action slot

    <b-table :data="movies">
       <template slot="actions" slot-scope="row">
         <b-button @click="edit(row)"> Edit </b-button>
         <b-button @click="delete(row)"> Delete </b-button>
       </template>
    <b-table />