我正在像这样从我的导航视图(xtype:'mainPanel')推送一个视图。它是标签栏的一个元素。在第二个视图back
中,导航栏中显示一个按钮,但它不起作用。任何想法?
itemtap: function(list, index, target, record) {
list.up('mainPanel').push({
xtype: 'newview',
title: 'New',
data: record.data
});
}
主.js
Ext.define('Proj.view.Main', {
extend: 'Ext.tab.Panel',
xtype: 'main',
requires: [
'Ext.TitleBar','Proj.view.phone.Mainpanel','Proj.view.phone.Home',''
],
config: {
tabBar: {
docked: 'bottom',
layout: {
pack: 'center'
}
},
items: [
{
xtype: 'homePanel'
},
{
xtype: 'mainpanel'
},
]
}
});
主面板.js
Ext.define('Proj.view.phone.MainPanel', {
extend: 'Ext.navigation.View',
xtype: 'mainpanel',
requires : [
'],
initialize:function(){
this.getNavigationBar().add(stuff);
Ext.getCmp('categoryList').setData(jsonObject.info);
},
config: {
title : 'Shop',
iconCls: 'favorites',
styleHtmlContent: true,
scrollable: true,
items: [
{
xtype: 'list',
fullscreen: true,
itemTpl: '{name}',
autoLoad: true,
id:'categoryList',
store: {
fields :['active', 'created','description']
},
listeners: {
itemtap: function(list, index, target, record) {
list.up('mainpanel').push({
xtype: 'newview',
title: 'newview',
data: record.data
});
}
}
}
]
},