<el-input  v-model="data[item.prop]"></el-input>

示例: data={size:''}
      config=[{label:'ceshi',prop:'size'}]

item 为循环后的对象

for (var i = 0; i < this.config.length; i++) {
	  this.data[this.config[i]['prop']] =''
}

//v-model 绑定后无法输入

for (var i = 0; i < this.config.length; i++) {
	// this.data[this.config[i]['prop']] =''
	this.$set(this.data, this.config[i]['prop'], '')
}

 

Logo

前往低代码交流专区

更多推荐