使用vue表达式对时间戳格式化

1). 页面html- vue表达式中跟上方法formatTime,页面打开后发现时间戳(毫秒表示)已经转换成功,页面html代码以下javascript <td class= "time">{{formatTime(scene.createTime)}}</td> 2). 定义用于时间格式化的js 函数html // 对Date的扩展,将 Date 转化为指定格式的String
相关文章
相关标签/搜索