我正在尝试将我的 Sencha 应用程序从 Sencha1 移植到 Sencha2。
似乎我的听众都没有工作。Sencha2 的文档似乎有不同的事件,并且事件数量较少:
http://docs.sencha.com/touch/1-1/#!/api/Ext.Panel
http://docs.sencha.com/touch/2-0/#!/api/Ext.Panel
有没有新的方法可以做到这一点?Sencha1 的监听器是否还没有在 Sencha2 中实现?
Ext.define('MyApp.view.Loading', {
extend: 'Ext.Panel',
googleAnalyticsName: 'Loading',
id: 'loadingView',
xtype: 'loading',
config: {
fullscreen: true,
layout: 'vbox',
scrollable: false,
items: [{
html: '<div id="loading-view" style="background-repeat: none;"><div id="loading-page-spinner"></div>'
}],
listeners: {
activate: function() {
console.log('activate listener');
},
afterrender: function() {
console.log('afterrender listener')
}
},
},
});