開(kāi)課吧 JavaEE企業(yè)級(jí)分布式高級(jí)架構(gòu)師020期
2022-10-30 16:28 作者:janet19961217 | 我要投稿
?let controller = {
? ? ? ?view = null,
? ? ? ?model = null,
? ? ? ?...... = null,
? ? ? ?init: function(){
? ? ? ? ? ?this.view = view ? ? ? ? ? ?this.model = model ? ? ? ? ? ?......
? ? ? ? ? ?this.bindEvents()
? ? ? ?},
? ? ? ?bindEvents: function(){
? ? ? ? ? ?// 綁定事件,與綁定事件無(wú)關(guān)的放在 controller 屬性上
? ? ? ?},
? ? ? ?......
? ?}
? ?controller.init( controller,model )
? ?//controller.init.call( controller,view, model )}.call()
標(biāo)簽: