0

メニュー列の上部に固定の検索バーが必要です。これは私がこれまでに持っているものです:

Ext.define('Cam.view.menu.LeftSidebar', {
    extend: 'Ext.panel.Panel',
    alias: 'widget.leftsidebar',
    views: 'Cam.view.menu.Search',
    defaults: {
        // applied to each contained panel
        bodyStyle: 'padding:0px;'
    },
    layout: {
        // layout-specific configs go here
        type: 'accordion',
        titleCollapse: true,
        animate: true,
        activeOnTop: true
    },
    title: _SIDEBAR_LEFT_TITLE,
    items: [
    {
        title: 'Menu Search',
        items: [{xtype: 'menusearch'
                }]
    },
    {
        title: _SIDEBAR_LEFT_PREVIOUS,
        xtype: 'menuhistory',
        itemId: 'menuhistory'
    },
    {
        title: 'Menu',
        items: [{xtype: 'screenmenu'}]
    }]
});

これまでのところ、それは私が望むように崩壊しますが、xtype:'menusearch'は私が一番上で修正したいものです。xtype:'menuhistory'がアクティブになります。

これについて何か助けはありますか?

4

1 に答える 1

0

あなたはこのようなことをすることができます:

Ext.require('*');

Ext.onReady(function() {

    Ext.create('Ext.panel.Panel', {
        width: 400,
        height: 400,
        renderTo: document.body,
        layout: {
            type: 'vbox',
            align: 'stretch'
        },
        items: [{
            xtype: 'textfield',
            fieldLabel: 'Search'
        }, {
            flex: 1,
            xtype: 'container',
            layout: 'accordion',
            items: [{
                title: 'Item 1',
                html: 'I1'
            }, {
                title: 'Item 2',
                html: 'I2'
            }, {
                title: 'Item 3',
                html: 'I3'
            }]
        }]
    });

});
于 2013-01-15T21:19:58.323 に答える