Answers for "Add rows to the table dynamically with the use of vue.js"

0

Add rows to the table dynamically with the use of vue.js

url: https://stackoverflow.com/questions/52211682/add-rows-to-the-table-dynamically-with-the-use-of-vue-js

var app = new Vue({
  el: '#app',
  data: {
    mail:'',
    date:'',
    adress:'',
    company:'',
    fliers:'',
    rowData:[] //the declared array
  },
  methods:{
    addItem(){
      var my_object = {
        mail:this.mail,
        date:this.date,
        adress:this.adress,
        company: this.company,
        fliers: this.fliers
      };
      this.rowData.push(my_object)

      this.mail = '';
      this.date = '';
      this.adress = '';
      this.company = '';
      this.fliers = '';
    }
  }
})
Posted by: Guest on August-08-2021

Code answers related to "Add rows to the table dynamically with the use of vue.js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language