1.回顯數據
beginTime = '2021-01-11'
endTime = '2021-01-19'
2.時間選擇器數組
data(){
return{
date:[]
}
}
3.回顯:在Vue2中使用數組的push方法,一定不要根據索引直接賦值,無用。Vue3可直接賦值。
this.date.push(new Date(beginTime));
this.date.push(new Date(endTime));