当前位置: 代码迷 >> JavaScript >> ext4的dockedItems有什么用?该怎么处理
  详细解决方案

ext4的dockedItems有什么用?该怎么处理

热度:284   发布时间:2013-03-06 16:20:31.0
ext4的dockedItems有什么用?
里面为什么又要放个items呢?我以前用ext3.2的
var panel = new Ext.panel.Panel({
    dockedItems: [{
        xtype: 'toolbar',
        dock: 'top',
        items: [{
            text: 'Docked to the top'
        }]
    }]
});

------解决方案--------------------
举个例子就清楚了:
var panel = new Ext.panel.Panel({
    dockedItems: [{
        xtype: 'toolbar',
        dock: 'top',
        items: [{
            text: 'Docked to the top'
        },{
        xtype: 'toolbar',
        dock: 'boottom',
        items: [{
            text: 'Docked to the bottom'
        }]
    }]
});

------解决方案--------------------
对该段代码解释就是在panel顶部放一个与panel同宽度的toolbar,在toolbar上放一个子部件,text为'Docked to the top'当然在toolbar上也可以添加其他的部件