[Vuejs]-How to add a css in vue-bootstrap table template

1๐Ÿ‘

โœ…

 <template slot="actions" slot-scope="data">
    <div :style="'min-width:150px'">
      <b-button variant="info" @click="showViewModel(data.item)">
         <i class="fa fa-eye"></i>
      </b-button>
      <b-button variant="danger" class="ml-1" @click="showConfirmBox(data.item.id,data.index)">
       <i class="fa fa-trash"></i>
      </b-button>
    </div>
  </template>
๐Ÿ‘คS. Gandhi

0๐Ÿ‘

Vueโ€™s template tag renders into nothing, so adding style to it has no effect.

Also, adding style with Vue you should use plain strings instead of objects. So instead of this:

:style="{min-width:'150px'}"

Use this:

:style="'min-width:150px'"
๐Ÿ‘คAyrton

Leave a comment