![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
VUE
文章平均质量分 65
ღ懋
这个作者很懒,什么都没留下…
展开
-
**前端经常会遇到日期格式转换的问题**
前端经常会遇到日期格式转换的问题1 格式:Tue Aug 21 2018 00:00:00 GMT+0800 (中国标准时间) 转 2018-21-08在遇到时间戳的问题时,可以调用此方法。1: date 表示你要传入的时间2: format表示你想要的格式 例如:你想要年月日就可以 dateFormat(new Date(), ‘yy-MM-dd’)export function dateFormat(date, format) {format = format || ‘yyyy-MM-dd原创 2021-03-30 18:13:04 · 354 阅读 · 1 评论 -
vue工具类,判断为空,判断不为空等~
/**通用工具类/export default class func {/*不为空@param val@returns {boolean}*/static notEmpty(val) {return !this.isEmpty(val);}/**是否为定义@param val@returns {boolean}*/static isUndefined(val) {return val === null || typeof val === ‘undefined’原创 2021-04-01 15:26:58 · 1819 阅读 · 1 评论