1、原因:ES6中已经去掉了Format 的方法
2、解决方法:
使用新的方法:
new Date().toLocaleDateString().split('/').join('-')
或者引入date.format.js
https://github.com/jacwright/date.format
1、原因:ES6中已经去掉了Format 的方法
2、解决方法:
使用新的方法:
new Date().toLocaleDateString().split('/').join('-')
或者引入date.format.js
https://github.com/jacwright/date.format