el-date-picker控件已经被置空了?

/ 时间 /

changeDate() {
  if (this.form.startEndDate != null) {
    this.form.beginDay = this.form.startEndDate[0];
    this.form.endDay = this.form.startEndDate[1];
  } else {
    this.form.beginDay = "";
    this.form.endDay = "";
  }
},
getRecordList() {
  this.loading = true;
  const params = {
    eateryId: this.id,
    beginDay: this.form.beginDay,
    endDay: this.form.endDay,
  };
  getDataRecordlistDeatall(params).then((res) => {
    this.loading = false;
    if (res.code === 0) {
      this.DataRecordPagedatas = res.data;
    }
  });
},
/** 搜索按钮操作 */
handleQuery() {
  this.getRecordList();
},
/** 重置按钮操作 */
resetQuery() {
  this.form.startEndDate = [];
  this.handleQuery();
},

el-date-picker控件已经被置空了?点击搜索应该会返回整个列表的数据, 现在是默认带了
image.png 这个时间段,请假点击搜索让它返回整个列表的所有数据

阅读 2.2k
1 个回答

没听明白你说的啥意思
你点击重置按钮好像只清空了this.form.startEndDate值但没有清空this.form.beginDay和this.form.endDay的值

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题