摘要: 这里简单的罗嗦一下 var 和 let 的区别 执行下面的代码1: (function() { console.log(name); let name = 'PapaerCrane'; })(); 执行下面的代码2: (function() { console.log(name); var name 阅读全文
posted @ 2020-04-04 22:17 骑着小毛驴1688 阅读(899) 评论(0) 推荐(0) 编辑
摘要: 相信网上对闭包有很多的解释,毕竟这个玩意儿是仁者见仁智者见智,对于a56爆大奖在线娱乐来说,总结了2个特性: 1.函数嵌套函数,内部函数可以引用外部函数的参数和变量 function aaa() { var a = 5; function bbb() { alert(a) } return bbb } var c = 阅读全文
posted @ 2020-04-04 21:42 骑着小毛驴1688 阅读(5154) 评论(1) 推荐(3) 编辑
摘要: // 函数声明 function funDeclaration(type){ return type "Declaration"; } // 函数表达式 var funExpression = function(type){ return type "Expression"; } 1.Javascr 阅读全文
posted @ 2020-04-04 21:29 骑着小毛驴1688 阅读(598) 评论(0) 推荐(0) 编辑
摘要: // 经典的写法 function test(n) { if (n <= 1) { return 1; } else { return n * test(n-1); } } test(4) // 24 上面的写法是没有问题的 ,但是如果遇到函数表达式的写法,可能会报错,比如: function te 阅读全文
posted @ 2020-04-04 21:26 骑着小毛驴1688 阅读(2260) 评论(0) 推荐(0) 编辑
摘要: npm config set registry https://registry.npmmirror.com/ npm config set disturl https://npm.taobao.org/dist npm config set electron_mirror https://npm. 阅读全文
posted @ 2020-03-16 09:50 骑着小毛驴1688 阅读(3015) 评论(0) 推荐(0) 编辑
摘要: 因为公司业务的需求,需要使用二维码扫描,折腾了大半天才折腾出来, 1、执行命令 npm install vue-qr 或者 yarn add vue-qr 2、在plugins文件下面创建 vueqr.js 3、在 vueqr.js 里面写入下面的代码: import Vue from 'vue'i 阅读全文
posted @ 2020-02-26 15:16 骑着小毛驴1688 阅读(1768) 评论(4) 推荐(0) 编辑
摘要: a56爆大奖在线娱乐是在nuxt.js中使用这个qrcode.js的,运行起来会报 Cannot read property '_android' of undefine 参考: https://github.com/davidshimjs/qrcodejs/issues/113 1.下载未解压的qrcode.js 阅读全文
posted @ 2020-02-26 14:40 骑着小毛驴1688 阅读(1204) 评论(1) 推荐(2) 编辑
摘要: 这里拿 ion-select 做测试 ionViewDidEnter() { // tslint:disable-next-line:variable-name const select_elements = (this.el.nativeElement.querySelectorAll('ion- 阅读全文
posted @ 2020-01-21 01:38 骑着小毛驴1688 阅读(609) 评论(0) 推荐(0) 编辑
摘要: 懒得讲原理了,直接贴代码: css部分: .slide-box { margin-top: 200px; display: -webkit-box; overflow-x: scroll; overflow-y: hidden; -webkit-overflow-scrolling: touch; 阅读全文
posted @ 2019-03-06 22:28 骑着小毛驴1688 阅读(15550) 评论(0) 推荐(0) 编辑
摘要: 不想吐槽 ionic-slides 的组件,是个巨坑。。。切换页面以后再返回当前页面, 不能自动播放,网上的解决方案都是没用的(亲测,后台获取的数据) ... 不信邪的宝宝们可以去试试。。建议换成swiper.js吧。。。因为ionic-slides本来就是基于这个插件开发的。。。 swiper官网 阅读全文
posted @ 2018-10-14 10:22 骑着小毛驴1688 阅读(2926) 评论(0) 推荐(1) 编辑