Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

149
Visualizações
how to display to buttons delete and edit in field action in vuejs and bootstrap

I am working a crud app with vue.js add bootstrap I want to create a dynamic data table in vue.js and bootstrap.

I have create for html:

<template>
  <div>
    <b-table striped hover :items="items" :fields="fields"></b-table>    
  </div>
</template>

I completed there files and items from json also for javascript.

script>

  export default {
    name:'DataTable',
    data() {
      return {
        // Note `isActive` is left out and will not appear in the rendered table
        fields: [ "id", "name",  "email", "phone", "action"],
        items: [
          { id: 1, name:"Leannes", email: "Sincere@april.biz", phone:"1-770-736-8031 x56442 "},
          { id: 2, name:"Leannes", email: "Sincere@april.biz", phone:"1-770-736-8031 x56442 "},
          { id: 3, name:"Leannes", email: "Sincere@april.biz", phone:"1-770-736-8031 x56442 "},
          { id: 4, name:"Leannes", email: "Sincere@april.biz", phone:"1-770-736-8031 x56442 "},
          { id: 5, name:"Leannes", email: "Sincere@april.biz", phone:"1-770-736-8031 x56442 "},
          { id: 6, name:"Leannes", email: "Sincere@april.biz", phone:"1-770-736-8031 x56442 "},
          { id: 7, name:"Leannes", email: "Sincere@april.biz", phone:"1-770-736-8031 x56442 "},
          { id: 8, name:"Leannes", email: "Sincere@april.biz", phone:"1-770-736-8031 x56442 "},
          { id: 9, name:"Leannes", email: "Sincere@april.biz", phone:"1-770-736-8031 x56442 "},
          { id: 10, name:"Leannes", email: "Sincere@april.biz", phone:"1-770-736-8031 x56442 "}
      
          // { isActive: false, age: 21, first_name: 'Larsen', last_name: 'Shaw' },
          // { isActive: false, age: 89, first_name: 'Geneva', last_name: 'Wilson' },
          // { isActive: true, age: 38, first_name: 'Jami', last_name: 'Carney' }
        ]
      }
    }
  }
</script>

My code look like picture below until now: enter image description here

but how I can make that in field Action to display to button edit and delete like below:enter image description here

Thanks.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda