1.安装: npm install moment --save 2.引入:import moment from 'moment.js' 3.moment("时间").format("YYYY-MM-DD") 相关文章: