- 博客(4)
- 收藏
- 关注
原创 获取本地时间和北京时间(前端处理)
在Vue项目中获取本地时间和北京时间 1、给date原型挂载format属性 在项目放js的地方放上以下代码: Date.prototype.strftime = function(format){ var o = { "M+" : this.getMonth()+1, //month "d+" : this.getDate(), //day "h+" : this.getHours(), //hour "m+" : this.getMinutes
2020-11-30 22:41:07
1511
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人