0
我一直在尝试使用组件加载程序,如component spec中所述。我不确定我如何通过组件文件做这样的事情:使用加载程序时扩展活动组件
var bookmarkableBaseClass = Ractive.extend({
oninit : function(){
this.on(commonBookmarkEvents);
},
data : {
badgeDefinitions: globalCommonBadgeDefinitions
}
});
Ractive.components.singlecard = bookmarkableBaseClass.extend({
template: "#smallcarditem"
});
Ractive.components.singleline = bookmarkableBaseClass.extend({
template: "#cardlineitem"
});
换句话说 - 有延伸具有共同属性的另一基座构件组件 - 即公用数据以及共同代理事件处理程序。目前组件规范只允许我包含其他组件,但没有像上面那样继承。
感谢您花时间回答。我目前使用rvc作为加载程序。 –