2018年8月28日

摘要: 1、变量 let 声明的变量只在它所在的代码块有效,不允许重复声明 const 声明是一个只读的常量。一旦声明,常量的值就不能改变。 const与let的作用域相同,只在声明所在的块级作用域内有效。 2、块级作用域 es5只有全局作用域和函数作用域,没有块级作用域,es6新增了块级作用域 let 为 阅读全文
posted @ 2018-08-28 17:03 momo-倩倩 阅读(110) 评论(0) 推荐(0)
 
摘要: 1.小程序中textarea不能在scroll-view、swiper、picker-view等等里面运用。 2.不在fixed布局的页面中,placeholder也会随着页面滚动,解决方法:顶级父元素不要设置高度,也不要设置overflow,自然滚动。 阅读全文
posted @ 2018-08-28 09:44 momo-倩倩 阅读(103) 评论(0) 推荐(0)

2018年8月21日

摘要: body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td { margin:0; padding:0; }body { bac 阅读全文
posted @ 2018-08-21 13:04 momo-倩倩 阅读(145) 评论(0) 推荐(0)

2018年7月25日

摘要: 执行以下命令: npm install --save mapbox-gl// cnpm install --save mapbox-gl 阅读全文
posted @ 2018-07-25 09:20 momo-倩倩 阅读(911) 评论(0) 推荐(0)

2018年7月9日

摘要: 匹配中文字符的正则表达式: [\u4e00-\u9fa5] 匹配双字节字符(包括汉字在内):[^\x00-\xff] 匹配空行的正则表达式:\n[\s| ]*\r 匹配HTML标记的正则表达式:/<(.*)>.*<\/\1>|<(.*) \/>/ 匹配首尾空格的正则表达式:(^\s*)|(\s*$) 阅读全文
posted @ 2018-07-09 15:50 momo-倩倩 阅读(163) 评论(0) 推荐(0)

2018年6月13日

摘要: getYMD (date) { let year = date.getFullYear() let month = (date.getMonth() + 1 > 9) ? (date.getMonth() + 1 + '') : ('0' + (date.getMonth() + 1)) let d 阅读全文
posted @ 2018-06-13 09:49 momo-倩倩 阅读(162) 评论(0) 推荐(0)
 
摘要: let daysOfMonth = []let fullYear = new Date(date).getFullYear()let month = new Date(date).getMonth() + 1month = month < 10 ? '0' + month : monthlet la 阅读全文
posted @ 2018-06-13 09:33 momo-倩倩 阅读(245) 评论(0) 推荐(0)

2018年6月12日

摘要: <el-date-picker v-model="ruleForm.pickDateMeal" type="daterange" align="right" :range-separator="$t('message.To')" :start-placeholder="$t('message.Sta 阅读全文
posted @ 2018-06-12 11:02 momo-倩倩 阅读(5501) 评论(0) 推荐(0)
 
摘要: /** * 返回两个日期之间的天数集合 * @param start 开始日期 * @param end 结束日期 * @returns {Array} */ export const twoDateDays = function (start, end) { let arr = [] let st 阅读全文
posted @ 2018-06-12 11:00 momo-倩倩 阅读(215) 评论(0) 推荐(0)

2018年6月4日

摘要: unique (arr) { for (let i = 0; i < arr.length; i++) { for (let j = i + 1; j < arr.length; j++) { if (arr[i] arr[j]) { arr.splice(j, 1) j-- } } } // 升序 阅读全文
posted @ 2018-06-04 14:29 momo-倩倩 阅读(207) 评论(0) 推荐(0)