vue默认日期显示今天
使用时间显示默认日期
created() {
this.getList()
var date = new Date();
var today = date.getDate();
if(parseInt(today) < 10){
today = '0' + today;
}
var dataMonth = date.getMonth() + 1;
if(parseInt(dataMonth) < 10){
dataMonth = '0' + dataMonth;
}
this.newdate = date.getFullYear() + '-' + dataMonth + '-' + today +' ' + '00:00:00';
var lastDate = date.getFullYear() + '-' + dataMonth + '-' + today +' ' + '23:59:59';
this.queryParam.startTime = this.newdate;
this.queryParam.endTime = lastDate;
},