摘要: 传统单例实现 基础实现 // 方式一:instance维护在对象中 // ES5 var Singleton = function (name) { this.name = name this.instance = null }; Singleton.prototype.getName = func 阅读全文
posted @ 2023-01-13 17:20 Better-HTQ 阅读(21) 评论(0) 推荐(0) 编辑