日期:2014-05-16  浏览次数:20300 次

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上也可以添加其他的部件