上一页 1 ··· 86 87 88 89 90 91 92 93 94 ··· 129 下一页
摘要: Function.prototype.addMethod = function (name, fn,proto) { // console.log(proto) if (proto true){ this[name] = fn; }else{ this.prototype[name] = fn; } 阅读全文
posted @ 2019-04-29 14:09 ThisCall 阅读(121) 评论(0) 推荐(0)
摘要: 如果加在函数上,可以用函数直接调用,如果是加在原型对象时,那就的创建新对象,才能使用,最重要的是影响继承 直接加在函数上的,不能被新对象继承 阅读全文
posted @ 2019-04-29 14:00 ThisCall 阅读(186) 评论(0) 推荐(0)
摘要: var book=function(){ // this.prototype.inner = function () { console.log('book_inner') }这种写法是错误的 this.inner2 = function () { console.log('book_inner2' 阅读全文
posted @ 2019-04-29 13:24 ThisCall 阅读(118) 评论(0) 推荐(0)
摘要: ctx.drawImage('../../../../page/home/resources/pic/che_logo.png', 10, 435, 50,50); 本地图片要根路径 阅读全文
posted @ 2019-04-29 12:01 ThisCall 阅读(2054) 评论(0) 推荐(0)
摘要: https://www.cnblogs.com/haoxl/p/5267724.html(copy) https://www.cnblogs.com/loveyoume/p/6112044.html(prototype) 1.函数声明 2.函数表达式,又叫函数字面量 两者的区别:解析器会先读取函数声 阅读全文
posted @ 2019-04-29 11:03 ThisCall 阅读(227) 评论(0) 推荐(0)
摘要: onLoad: function(options) { console.log(Function) Function.prototype.addMethod = function(name, fn) { this[name] = fn; } console.log(Function.addMetho 阅读全文
posted @ 2019-04-29 10:27 ThisCall 阅读(164) 评论(0) 推荐(0)
摘要: https://www.cnblogs.com/chengjian-physique/p/8076356.html(copy) 阅读全文
posted @ 2019-04-28 14:59 ThisCall 阅读(85) 评论(0) 推荐(0)
摘要: 对onPageScroll中的setData赋值次数进行节流 https://www.jianshu.com/p/b835527a792e(没看完) onPageScroll: function (e) { console.log(e); let arrHeight = this.data.arrH 阅读全文
posted @ 2019-04-26 18:01 ThisCall 阅读(194) 评论(0) 推荐(0)
摘要: http://www.cnblogs.com/zishang91/p/8507485.html(copy 第一种 <!-- 正常商品列表 --> <view class='goods-list flexw'> <block wx:key="list" wx:for="{{list}}"> <view 阅读全文
posted @ 2019-04-26 17:46 ThisCall 阅读(236) 评论(0) 推荐(0)
摘要: https://blog.csdn.net/rolan1993/article/details/88106343 在做一个小球跟随手指移动的效果时候,由于在touchmove事件中频繁调用setData改变小球的位移实现,在开发工具和IOS平台还算流畅,但在安卓机下手机预览出现极其卡顿的交互,简直是 阅读全文
posted @ 2019-04-25 10:25 ThisCall 阅读(577) 评论(0) 推荐(0)
上一页 1 ··· 86 87 88 89 90 91 92 93 94 ··· 129 下一页