feat():日期默认当前时间

master
jiyufei 2 months ago
parent 89f7f9df5e
commit fe6c3f3818

@ -342,6 +342,12 @@ export default {
}, },
// //
async initSearchData() { async initSearchData() {
const now = new Date();
const year = now.getFullYear();
const month = String(now.getMonth() + 1).padStart(2, '0');
const startDate = `${year}-${month}-01 00:00:00`;
const startDateTimestamp = new Date(startDate).getTime();
this.query.years = [startDateTimestamp, startDateTimestamp];
}, },
initData() { initData() {
this.listLoading = true; this.listLoading = true;

Loading…
Cancel
Save