上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 27 下一页
摘要: 1.Promise的立即执行性 var p = new Promise(function(resolve, reject){ console.log("create a promise"); resolve("success"); }); console.log("after new Promise 阅读全文
posted @ 2020-07-01 16:55 rachelch 阅读(324) 评论(0) 推荐(0)
摘要: window.location.href(当前URL) 结果如下: http://www.link.com:8080/test?id=123&username=xxx window.location.protocol(协议) 结果如下: http: window.location.host(域名 + 阅读全文
posted @ 2020-07-01 10:01 rachelch 阅读(280) 评论(0) 推荐(0)
摘要: 解决的核心思想就是:不允许用户访问到带 from 参数的地址,如果收到 from 参数,就去掉 from 重新拼接 url ,重定向到不带 from 的 url router.beforeEach((to, from, next) => { if (window.location.href.incl 阅读全文
posted @ 2020-07-01 09:53 rachelch 阅读(686) 评论(0) 推荐(0)
摘要: 数组常用方法: 数组解构赋值应用 // 交换变量 [a, b] = [b, a] [o.a, o.b] = [o.b, o.a] // 生成剩余数组 const [a, ...rest] = [...'asdf'] // a:'a',rest: ["s", "d", "f"] 数组浅拷贝 const 阅读全文
posted @ 2020-06-24 17:12 rachelch 阅读(246) 评论(0) 推荐(0)
摘要: 一、引入微信js // index.html <script src="http://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script> 二、封装wxshare.js // assets => js => 新建 wxshare.js export fu 阅读全文
posted @ 2020-06-18 11:43 rachelch 阅读(477) 评论(0) 推荐(0)
摘要: ios中,用 swiper 实现轮播图 swiper圆角,图片滑动的时候会先变成直角然后变成圆角(vant) 解决方法: 在swiper的父盒子上加overflow:hidden 和 transform: translateY(0); <div class="my-swipe-box"> <van- 阅读全文
posted @ 2020-06-15 13:36 rachelch 阅读(2801) 评论(0) 推荐(1)
摘要: 最近遇到这样一个问题,在HTML5手机页面中,直接给<img>标签设置宽高,即便图片路径正常,在IOS真机下也是无法显示的,而在安卓以及浏览器的模拟真机上都是正常显示的,这是为什么呢? <img src="xxxx.png" /> img{ width: 100px; height: 100px; 阅读全文
posted @ 2020-06-15 10:04 rachelch 阅读(2126) 评论(0) 推荐(0)
摘要: alert组件: <template> <div class="alertBox" :value="value" v-if="visible" @click="close_click" style="z-index: 999;"> <div class="alertMain" @click.stop 阅读全文
posted @ 2020-06-11 16:33 rachelch 阅读(638) 评论(0) 推荐(0)
摘要: 移动端页面中有一个search input想监听搜索键盘中的 “搜索按钮”,看了下keycode是13,但是每次按下回车,回报非法 return 的错误 报错: Uncaught SyntaxError: Illegal return statement 代码如下: <form action="ja 阅读全文
posted @ 2020-05-12 15:08 rachelch 阅读(1692) 评论(0) 推荐(0)
摘要: window.onresize事件来做突破点的,但是 ios 中软键盘的弹起收起并不触发 window.onresize 事件 总结:1、在 ios 中软键盘弹起时,仅会引起 $(‘body’).scrollTop 值改变,但是我们可以通过输入框的获取焦点情况来做判断,但也只能在 ios 中采用这个 阅读全文
posted @ 2020-05-09 17:21 rachelch 阅读(3650) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 27 下一页