安装 npm install timeformat 导入 const timeformat = require('timeformat_jie') 格式化时间 const time = timeFormat.dateFormat(new Date()) console.log(time);