安装 npm install dayjs --save 使用 var dayjs = require('dayjs') //import dayjs from 'dayjs' // ES 2015 dayjs().format() // 日期格式化 export formatDate = (value, format = 'YYYY-MM-DD HH:mm:ss') => { return dayjs(value).format(format); }