原始代码:
<el-form-item label="接口参数">
<el-row v-for="(item, i) in serviceinterface.params" :key="item + Math.Random()">
<el-input placeholder="参数名称" v-model="item" ></el-input>
</el-row>
</el-form-item>
this.serviceinterface.params.push("");
修改后代码:
<el-form-item label="接口参数">
<el-row v-for="(item, i) in serviceinterface.params" :key="item.createDate">
<el-input placeholder="参数名称" v-model="item.paramName" ></el-input>
</el-row>
</el-form-item>
this.serviceinterface.params.push({
paramName: "",
createDate: Date.now(),
});