Javascript Sencha Touch 2-TabPanel在MVC设计的应用程序中不起作用
今天给你一个简单的问题 这项工作:Javascript Sencha Touch 2-TabPanel在MVC设计的应用程序中不起作用,javascript,model-view-controller,sencha-touch,extjs,sencha-touch-2,Javascript,Model View Controller,Sencha Touch,Extjs,Sencha Touch 2,今天给你一个简单的问题 这项工作: var carousel = Ext.create('Ext.Carousel', { fullscreen: 'true', //load in views view clean instantiation using // the widget.alias's defined in each view... yea // For some reason, pu
var carousel = Ext.create('Ext.Carousel', {
fullscreen: 'true',
//load in views view clean instantiation using
// the widget.alias's defined in each view... yea
// For some reason, putting flex on these components... oh...
// Have to call directly in by just the xtype since these are just
// references..
items: [
{
xtype: 'Main'
},
{
xtype: 'CommentList'
}
]
这不起作用:
var tabpanel = Ext.create('Ext.TabPanel', {
fullscreen: 'true',
tabBarPosition: 'bottom',
defaults: {
styleHtmlContent: true
},
//load in views view clean instantiation using
// the widget.alias's defined in each view... yea
// For some reason, putting flex on these components... oh...
// Have to call directly in by just the xtype since these are just
// references..
items: [
{
xtype: 'Main',
title: 'The Main',
iconCls: 'user'
},
{
xtype: 'CommentList',
title: 'Comments',
iconCls: 'user'
}
]
});
如您所见,它们基本相同,只是一个是TapPanel(添加了所需的默认配置),另一个是carousel
其他一切都是一样的。。。。这在我的Sencha Touch 2.0应用程序的app.js中,该应用程序是按照MVC架构设计的
“不工作”选项卡面板的结果是,我只看到第一个视图(主视图),而没有选项卡栏出现在屏幕底部
你知道我的问题是什么吗?全屏显示应该是
全屏显示:true
而不是全屏显示:“true”
。您还可以添加以下代码以使它们切换:
cardSwitchAnimation: {type: "fade", duration: 1000},
layout: "card",
没有测试它,但它对我有效(从我自己的代码片段中获得)我不确定这是否是一个问题,但在我的代码中,行是:
Ext.create("Ext.tab.Panel", {
不是:
Sencha 2.0 Pr2似乎没有此cardSwitch配置。。。有什么想法吗?似乎添加“card”布局导致了一个错误“uncaughttypeerror:cannotcallmethod'setReverse'of null”。。。你以前见过这样的事吗?我想补充一点。。。我还得到了一个错误:“Object[Object Object]没有方法‘getAnimation’。”。。这在Panel.js文件(sdk源代码中)中发生。。。我确保在选项卡面板中添加布局:'card'和cardSwitchAnimation:{type:'fade',duration:1000},但这是我得到的错误。。。也许在线路中有一些基本的地方我做错了?
Ext.create('Ext.TabPanel', {