Questions tagged «backbone-events»

15
骨干网视图:从父级继承并扩展事件
骨干网的文档指出: events属性也可以定义为返回事件哈希的函数,以使其更易于以编程方式定义事件以及从父视图继承它们。 您如何继承父项的视图事件并扩展它们? 父视图 var ParentView = Backbone.View.extend({ events: { 'click': 'onclick' } }); 儿童观 var ChildView = ParentView.extend({ events: function(){ ???? } });
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.