vuejs实现字符串转日期的方法:1、安装moment包;2、在组件中引入moment;3、使用“let str = moment(new Date()).format("YYYY-MM-DD hh:mm:ss")”方法