a-range-picker

<a-range-picker
   showTime
   :placeholder="['开始时间', '结束时间']"
   format="YYYY-MM-DD HH:mm:ss"
   :value="createValue"
   @change="createChange"
 />
  
  data() {
  	return {
        createValue: [],
    }
  }

选择时间时:

 createChange(dates, dateStrings) {
    this.createValue = dates;
    this.params.beginTime = dateStrings[0]
    this.params.endTime = dateStrings[1]
  },

清空设置this.createValue=[];即可

a-date-picker

<a-date-picker
  v-model="timeValue"
  format="YYYY-MM-DD HH:mm:ss"
  showTime
  @change="onChange"
/>
data() {
  	return {
        timeValue: undefined,
    }
  }

清空设置this.timeValue=undefined;即可

Logo

前往低代码交流专区

更多推荐