<el-date-picker
v-model="filters.dateValue"
type="daterange"
value-format="yyyy-MM-dd"
:default-time="['00:00:00', '23:59:59']"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
filters: {
dateValue: ["", ""],
dateValue: ["", ""],
},
//因为选择时间,然后删除时间后再次搜索,会直接报错。后发现容错如下:
beginDate:
this.filters.dateValue != null
? this.filters.dateValue[0]
: this.filters.dateValue,
endDate:
this.filters.dateValue != null
? this.filters.dateValue[1]
: this.filters.dateValue,