【问题标题】:Extjs4 space issue while using menu.menu使用 menu.menu 时出现 Extjs4 空间问题
【发布时间】:2013-10-03 11:57:37
【问题描述】:

我在 extjs 工作。我认为=

Ext.define('a.b.searchPanel',{
extend: 'Ext.panel.Panel',    
alias : 'widget.searchpanel',

me.items = [{
            xtype: 'container',
            height: 40,
            layout: {
                        type: 'hbox'
                    },
            items : [{
                        xtype: 'textfield',
                        itemId: 'keywordtextField',
                        fieldLabel:
                        labelAlign : 'right',
                        name: 'field1',
                        labelWidth:80,
                        padding: '5 30 0 30',
                        width:265
                     },{
                        xtype: 'image',
                        margin: '8 0 0 0',
                        width: 14,
                        src :'../../UI-INF/images/form/icon-question.png',
                        listeners: {
                            afterrender : function(img, eOpts){
                                img.el.on('mouseover', function() {});
                            }
                        }
                 }]
          },{
            xtype: 'combo',
            itemId: 'tagsCombo',
            queryMode: 'local',
            padding: '5 10 0 115',
            store:searchPanelTagStore,
            width: 180,
            multiSelect: true,
            displayField: 'name',
            valueField: 'id',

       },{
            xtype: 'container',
            layout: {
                        type: 'hbox',
                        padding: '10 30 0 10'
                    },
                    defaults:{
                        margins: '0 30 0 10'
                    },
            items : [{
                xtype: 'datefield',
                name: 'searchStartdate',
                labelWidth:90,
                labelAlign: 'right',
                itemId: 'searchPanelStartdate'
            },{
                xtype: 'datefield',
                name: 'searchClosedate',
                itemId: 'searchPanelClosedate'
            }]
        },
})

我已将上述视图作为 xtype 包含在=中

menu: Ext.create('Ext.menu.Menu',{
                    id: 'searchMenu',
                    margin:'0 0 0 0',
                    padding:'0 0 0 0',
                    items: [{
                        xtype:'searchpanel',
                        width: 500,
                        id: 'search-panel',                             
                        height: 300
                    }]  

此屏幕显示为= 当我使用 menu.menu 时,我的搜索面板视图在左侧有空间边距。那么如何去除这个空间呢?我想查看左侧的所有字段

【问题讨论】:

    标签: menu extjs4


    【解决方案1】:

    应用以下 css。它适用于 Ext js 4.2

    .no-icon-menu .x-menu-item-icon {
        display: none; 
    }
      Ext.create('Ext.menu.Menu',{
                        id: 'searchMenu',
                        margin:'0 0 0 0',
                        padding:'0 0 0 0',
                        iconCls : 'no-icon-menu',
                        items: [{
                            xtype:'searchpanel',
                            width: 500,
                            id: 'search-panel',                             
                            height: 300
                        }] 
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-04-07
      • 2010-11-24
      • 2022-12-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-04-19
      • 1970-01-01
      相关资源
      最近更新 更多