12 2018 档案
vue去除前后空格
摘要:trim v-model.trim="nameSearchData" 阅读全文
posted @ 2018-12-20 20:38 瑶哥哥可真帅啊! 阅读(1053) 评论(0) 推荐(0)
判断数组中是否包含某元素,判断字符串中是否包含某字符串
摘要:let arr = [1, 2, 3, 4]; if (arr.indexOf('1') > -1) {} //判断1是否在数组arr中,true=是 let str = string; if (str.indexOf('t') !== -1) {} //判断字符串string中是否包含"t",tr 阅读全文
posted @ 2018-12-20 20:30 瑶哥哥可真帅啊! 阅读(8495) 评论(0) 推荐(0)
时间戳转换成日期格式
摘要:let collectTime = res.data.data.collect_time this.timeData = new Date(parseInt(collectTime) * 1000).toLocaleString().replace(/:\d{1,2}$/,' ') let coll 阅读全文
posted @ 2018-12-13 11:35 瑶哥哥可真帅啊! 阅读(316) 评论(0) 推荐(0)