摘要:
圣杯模式 圣杯模式的核心就是拿一个空的构造函数去当中间人,解决组合模式的缺陷。 举个例子 function Person(name, age) { this.name = name??""; this.age = age??""; }; Person.prototype.say = function 阅读全文
posted @ 2024-09-16 22:29
HuangBingQuan
阅读(55)
评论(0)
推荐(0)
摘要:
组合模式 前置知识 原型 原型链 apply 举个例子 function Person(name, age) { this.name = name??""; this.age = age??""; }; Person.prototype.say = function () { console.log 阅读全文
posted @ 2024-09-16 19:18
HuangBingQuan
阅读(9)
评论(0)
推荐(0)

浙公网安备 33010602011771号