項目用的vue+elementUI, elementUI時間組件的獲取是標準時間,我用js來格式化 比如簡單的: var time = new Date('Thu May 12 2016 08:00:00 GMT+0800 (中國標準時間)');newDate=time .getFullYear() + '-' + (time .getMonth() + 1) + '-' + time .getDate() + ' ' + time .getHours() + ':' + time .getMinutes() + ':' + time .getSeconds();這樣運行之后就會報錯這是什么原因呢
vuejs 獲取時間 getHours報錯
暮色呼如
2019-03-12 13:14:24