现象 当使用 moment 进行时间格式转换时,遇到如下报错: 解决方法 你使用了moment.js的文件里面加一句代码 import moment from 'moment' moment.suppressDeprecationWarnings = true