timeFormatting(val) { let time = val.slice(0, 10) // 兼容IOS time = time.replace(/-/g, '/') let date = new Date(time); let Y = date.getFullYear() let M = date.getMonth() + 1 let D = date.getDate() let h = (date.getHours() < 10) ? '0' + date.getHours() : date.getHours() let m = (date.getMinutes() < 10) ? '0' + date.getMinutes() : date.getMinutes() return Y + '年' + M + '月' + D + '日' },
标签:10,getMinutes,getHours,IOS,兼容,let,time,date,JS From: https://www.cnblogs.com/shining-feifan/p/16866061.html