首先在方法里声明时间接收

addDate() {
                    nowDate = new Date();
                    let date = {
                        year: nowDate.getFullYear(),
                        month: nowDate.getMonth() + 1,
                        date: nowDate.getDate(),
                    }
                    console.log(date);
                    let systemDate = date.year + '-' + 0 + date.month + '-' + 0 + date.date;
                }

 

转载于:https://www.cnblogs.com/Hajar/p/11112849.html

Logo

前往低代码交流专区

更多推荐