v-model绑定
<el-date-picker clearable
v-model="form.collectDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择收拍日期">
</el-date-picker>
<el-date-picker clearable
v-model="form.toAuctionNo"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择参拍场次">
</el-date-picker>
methods中添加按钮事件方法,给对应的v-model赋值
methods: {
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加拍品信息";
var date = new Date();
this.form.collectDate = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + (date.getDate());
this.form.toAuctionNo = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + (date.getDate());
},
}