官网 https://day.js.org/ 安装 执行npm install dayjs: 安装完成后,package.json文件中自动更新了依赖: 导入 格式化时间 在浏览器中发布一条新的评论,日期时间格式正确: