离职提了,一个字,爽!!!
评论区抽一杯奶茶。
function extend (child, parent) {
var F = function () {};
F.prototype = parent.prototype;
child.prototype = new F();
child.prototype.construtor = child;
// ? 实在不知道这里为什么要这样
child.parent = parent.prototype;
if(!parent.prototype.contrucotor == Object.prototype.constructor){
parent.prototype.constructor = parent;
}
}
展开
12
1
你们家小孩这么大会说话吗