Open Sogrey opened 3 years ago
// 借用构造函数继承实例属性 function Child () { Parent.call(this) } // 寄生继承原型属性 (function () { let Super = function () {} Super.prototype = Parent.prototype Child.prototype = new Super() })()