【发布时间】:2016-09-09 12:32:13
【问题描述】:
我有一个垂直标签栏,我希望 tabitems 水平拉伸以适合我的边框布局的西部区域。我拥有 sencha fiddler 中的所有内容,但我不知道如何共享链接,以便每个人都可以看到我的代码。任何想法如何解决这个问题......并分享我的提琴手?
Ext.application({
name: 'Fiddle',
launch: function() {
//Ext.Msg.alert('Fiddle', 'Welcome to Sencha Fiddle!');
var mainVP = Ext.create(Ext.container.Viewport, {
layout: 'border',
defaults: {
style: 'border: 1px solid black'
},
items: [{
html: 'hio',
region: 'center',
xtype: 'tabpanel',
title: 'main tab panel'
}, {
html: 'north',
region: 'north',
height: 50,
title: 'this is my header area'
}, {
html: 'east',
region: 'east',
width: 50
}, {
html: 'west',
region: 'west',
width: 250,
title: 'westregion',
xtype: 'NavigationBar'
//items: [{
//xtype: 'button',
//text: 'click me',
//listeners: {
// click: function(btn) {
//Ext.Msg.alert('Fiddle', 'Welcome to Sencha Fiddle!');
// btn.up('viewport').down('tabpanel').add({
// xtype: 'clientDetails'
// });
//}
//}
//}]
}]
});
}
});
Ext.define('Ext.test1.NavigationBar', {
extend: 'Ext.tab.Panel',
alias: 'widget.NavigationBar',
tabBar: {
//width: 250,
//minTabWidth: 130,
//maxTabWidth: 240,
orientation: 'vertical',
//defaults: {
// flex: 1
//}
//dock: 'left',
//layout: {
// pack: 'center'
//}
},
layout: 'fit',
tabPosition: 'left',
//titleRotation: 0,
tabRotation: 0,
items: [{
title: 'Home',
iconCls: 'fa-home',
layout: 'fit'
// The following grid shares a store with the classic version's grid as well!
}, {
title: 'Users',
iconCls: 'fa-user'
//layout: 'fit'
}, {
title: 'Groups',
iconCls: 'fa-users'
//layout: 'fit'
}, {
title: 'Settings',
iconCls: 'fa-cog'
//layout: 'fit'
}]
});
【问题讨论】:
-
您可以分享您的小提琴,通过使用您的 Sencha 论坛用户名和密码登录 Sencha fiddle,而不是保存小提琴并复制 url - fiddle.sencha.com/#fiddle/1gib
-
标签不会拉伸,因为空白实际上是存在的,因为它是标签内容区域。您可以将选项卡面板放在主选项卡面板中,实际上不需要西区。
-
我喜欢边界布局,所以我也可以有一个南北区域。所以没有办法拉伸标签项?