【vue】动态添加表单input

html:

 
	
		
               
        			 
              
       
        
                 
           
      


      
            
                
            
      

script:

 data () {
      return {
          formData: {
              peers:[""],
       	},
}

addPeer(){
      this.formData.peers.push('')
  },
 delPeer(index){
      this.formData.peers.splice(index)
  },

你可能感兴趣的:(vue)