2019年8月15日
摘要: let reg = new RegExp(/\ud83c[\udf00-\udfff]|\ud83d[\udc00-\ude4f]|\ud83d[\ude80-\udeff]/) if (reg.test(val)) { tip = '不能输入表情符号' Vue.$vux.toast.text(tip) return false } 阅读全文
posted @ 2019-08-15 10:42 猫尾草 阅读(266) 评论(0) 推荐(0) 编辑
摘要: 1.浏览器滚动条滚动到页面顶部 document.body.scrollTop = 0 2.浏览器滚动条滚动到页面底部 document.body.scrollTop = document.body.scrollHeight 3.获取滚动条滚动的距离 document.documentElement 阅读全文
posted @ 2019-08-15 10:39 猫尾草 阅读(312) 评论(0) 推荐(0) 编辑
  2019年8月2日
摘要: 1.项目中通过require引入 分别引入ueditor.config.js,ueditor.all.js,ZeroClipboard.js。 2.添加依赖 3.页面引入 4.初始化 阅读全文
posted @ 2019-08-02 09:54 猫尾草 阅读(474) 评论(0) 推荐(0) 编辑
  2019年7月11日
摘要: 判断元素在滚动区域是否可见,不可见时滚动到可见区域。 var itemHeight = $('.item').height(); // 元素高度 var wrapHeight = $('.wrap').height(); // 滚动区域容器高度 var index = $('.item').inde 阅读全文
posted @ 2019-07-11 14:11 猫尾草 阅读(3048) 评论(0) 推荐(0) 编辑
  2019年4月17日
摘要: <template> <div class="page page-scroller"> <scroller class="scroller" style="padding-top: 0" :on-refresh="refresh" :on-infinite="infinite" ref="my_sc 阅读全文
posted @ 2019-04-17 16:55 猫尾草 阅读(2531) 评论(0) 推荐(0) 编辑
  2019年2月28日
摘要: 在使用vue开发移动端项目过程中,统一数组在对多个变量赋值时;希望一个数组的改变不影响另外一个数组,此时可以使用如下方式实现: 阅读全文
posted @ 2019-02-28 14:01 猫尾草 阅读(7623) 评论(0) 推荐(0) 编辑
摘要: 1.Element.scrollIntoView(Boolean) 方法让当前的元素滚动到浏览器窗口的可视区域内。 参数:true 表示元素的顶端将何其所在滚动区的可视区域的顶端对其;false表示元素的低端将和其所在滚动区的低端对其。 2.Element.scrollIntoViewIfNeede 阅读全文
posted @ 2019-02-28 09:46 猫尾草 阅读(1165) 评论(0) 推荐(0) 编辑
  2019年2月27日
摘要: 1.点击按钮图片或者链接时会有一个背景色 修改样式cursor为default,不要使用pointer 2.监听键盘输入文字个数 使用input事件监听 阅读全文
posted @ 2019-02-27 16:15 猫尾草 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 1.使用confirm.prompt组件时,ios下点击输入框很难获得焦点 解决思路:使用confirm.show方法,自定义content内容,show方法里面设置input的focus方法 2.vue打包后大图片路径出错,需要到build -> utils.js中加入下面代码 阅读全文
posted @ 2019-02-27 16:11 猫尾草 阅读(722) 评论(0) 推荐(0) 编辑
摘要: css页面布局,实现内容部分自适应屏幕,当内容高度小于浏览器窗口高度时,页脚在浏览器窗口底部;当内容高度高于浏览器窗口高度时,页脚自动被撑到页面底部。 阅读全文
posted @ 2019-02-27 15:04 猫尾草 阅读(1855) 评论(0) 推荐(0) 编辑