2016-04-09 8 views

Antwort

2
methods:{ 

    addRow: function(){ 

    for(var i=0; i < this.number && i < 10; i++){ 

     this.rows.push({}); 

    } 

}, 
+0

funktioniert nicht :( –

0

Wer die Antwort sucht. können Sie diese Geige überprüfen.

https://jsfiddle.net/7nxhygLp/21/

methods:{ 
    addRow: function(){ 
    this.number = parseInt(this.number); 
      if(total + this.number <= 10) 
    { 
         total += this.number; 
         for(var i=0; i < this.number; i++){ 
         this.rows.push({}); 
        } 
     } 
    } 
Verwandte Themen