import moment from 'moment';
const timeFormat = 'YYYY-MM-DD HH:mm:ss';
const currentTime = moment(new Date()).format(timeFormat);
console.log('currentTime :', currentTime )
利用moment把当前时间 格式化为‘YYYY-MM-DD HH:mm:ss‘
最新推荐文章于 2024-11-27 09:47:56 发布