javascript Date format(js日期格式化过滤器)
// 自定义过滤器
Vue.filter('formatDate', function (value,fmts) {
var fmt = fmts
if (value === null || value === '' || value === undefined) {
return
}
var date = new Date(parseInt(value))
if(/(y+)/.test(fmt)){
fmt = fmt.replace(RegExp.$1,(date..
原创
2021-07-26 23:27:11 ·
425 阅读 ·
0 评论