1: 时间日期显示格式:
<el-form-item :label="日期范围">
<el-date-picker
v-model="timeRange"
type= "daterange"
range-separator="至"
start-placeholder = "开始时间"
end - placehodler = "结束时间"
format = "yyyy 年 MM 月 dd 日"
value-format = "yyyy-MM-dd"
>
</el-date-picher>
</el-form-item>
//在 watch 方法中监听: watch 中可以监听data 中数据
watch () {
timeRange(newValue, oldValue) {
console.log(newValue, 111111111)
if (newVal != null) {
this.dataQueryForm[2].text = newVal[0];
this.dataQueryForm[3].text = newVal[1];
} else {
this.dataQueryForm[2].text = '';
this.dataQueryForm[3].text = '';
}
}
}