【问题标题】:cant customize the tabbar view in TabPanel in sencha touch 2. The default view is showing always.无法在 sencha touch 2 中自定义 TabPanel 中的标签栏视图。默认视图始终显示。
【发布时间】:2012-10-03 06:50:34
【问题描述】:

我想更改选项卡的视图,我希望它们大且呈矩形,但它们显示为默认胶囊(具有弯曲半径的矩形)。如何自定义?

这里是代码

var entryForm = Ext.define("TimeSheet.view.Newentry", {
extend: "Ext.TabPanel",
requires: ["Ext.XTemplate", "Ext.field.DatePicker", "Ext.field.Select", "Ext.TitleBar", "Ext.DateExtras"],
xtype:'newentryview',

config: {
    autodestroy: true,
    fullscreen: true,
    scrollable: true,
    cardSwitchAnimation: 'cube',
    tabBarPosition: 'top',
    tabBar: {
        height: '70px',
        layout: {
            pack: 'center'
        }
    },
    defaults: {
        styleHtmlContent: true
    },
    items: [{
        title: 'Add Entry',
        iconMask: true,
        iconCls: 'info',
        flex: 1,
        style: 'border: none; font: 22px Arial black',
        fullscreen: true,
    },{
        title: 'Dashboard',
        iconMask: true,
        iconCls: 'compose',
        flex: 1,
        cls: 'dashpnl',
        style: 'border: none; font: 22px Arial black',
        fullscreen: true,
    },{
        title: 'Settings',
        iconMask: true,
        iconCls: 'settings',
        fullscreen: true,
        html: 'Page 3',
    }]
}

});

【问题讨论】:

    标签: model-view-controller sencha-touch-2 tabbar tabpanel tabview


    【解决方案1】:

    您可以在您的 css 文件中更改它:

    如果您的标签面板停靠在顶部:

    .x-tabbar.x-docked-top .x-tab {
        padding: 0.4em 2em;
        -webkit-border-radius: 0em;
        border-radius: 0em;
    }
    

    如果您的标签面板停靠在底部:

    .x-tabbar.x-docked-bottom .x-tab {
        padding: 0.4em 2em;
        -webkit-border-radius: 0em;
        border-radius: 0em;
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多