add rows to the table dynamically with the use of vue js

Solutions on MaxInterview for add rows to the table dynamically with the use of vue js by the best coders in the world

showing results for - "add rows to the table dynamically with the use of vue js"
Liana
10 Jun 2018
1url: https://stackoverflow.com/questions/52211682/add-rows-to-the-table-dynamically-with-the-use-of-vue-js
2
3var app = new Vue({
4  el: '#app',
5  data: {
6    mail:'',
7    date:'',
8    adress:'',
9    company:'',
10    fliers:'',
11    rowData:[] //the declared array
12  },
13  methods:{
14    addItem(){
15      var my_object = {
16        mail:this.mail,
17        date:this.date,
18        adress:this.adress,
19        company: this.company,
20        fliers: this.fliers
21      };
22      this.rowData.push(my_object)
23
24      this.mail = '';
25      this.date = '';
26      this.adress = '';
27      this.company = '';
28      this.fliers = '';
29    }
30  }
31})
32