摘要: Apply 使用指定的对象调用当前函数 由于Javascript函数中的this是谁调用,就指向谁,所以为了可以控制this对象指向,我们可以使用Apply与Call 语法 1 func.apply(thisArg, [argsArray]) 可以执行方法,在执行函数的时候,可以改变方法里面this 阅读全文
posted @ 2020-05-03 18:58 码农-编程小子 阅读(134) 评论(0) 推荐(0) 编辑
摘要: /** * Auto log * Auto unsubscrible */ export function AutoComponent(obs$ = []) { return function (constructor: Function) { console.log(constructor, "l 阅读全文
posted @ 2020-05-03 14:19 码农-编程小子 阅读(273) 评论(0) 推荐(0) 编辑