0

我正在尝试创建一个折叠和展开根本不起作用的手风琴布局。我正在使用 ext-4.1.0。

我创建了一个视图并使用控制器将此视图添加到另一个面板。添加 colpase 和 expand 后有一个奇怪的行为。+ 图标不会更改为 - 并且不会在第二次单击时展开。

这是代码

            Ext.define('AM.view.MyView' ,{
                extend:'Ext.panel.Panel',
                title: 'Accordion Layout',
                alias:'widget.myView',


                layout: {
                    type: 'accordion',
                    titleCollapse: false,
                    animate: true,
                    activeOnTop: true
                },
                width:300,
                height: 300,
                defaults: {
                    bodyStyle: 'padding:15px'
                },

                items: [{
                    title: 'Panel 1',
                    html: 'Panel content!',
                        floatable:false

                },{
                    title: 'Panel 2',
                    html: 'Panel content!',
                    floatable:false
                },{
                    title: 'Panel 3',
                    html: 'Panel content!',
                    floatable:false
                }]
            });                 

刚刚访问了 1 个链接(http://www.sencha.com/forum/showthread.php?247396-4.1.3-Accordion-Layout-not-working-when-dynamically-adding-items)但没有帮助。

在此先感谢您的帮助

4

1 回答 1

0

It seems like this is a known Sencha bug, and according to the bug report, it has been fixed in ExtJs 4.2.0

The best thing you could do is download 4.2.0 here -> http://www.sencha.com/forum/showthread.php?251214-Ext-JS-4.2-Beta-is-Now-Available&goback=%2Egde_4423985_member_195603826

Alternatively, you could see if you can find a patch on the net and apply that, or write your own patch and apply that yourself.

Cheers

Baz

于 2013-02-22T12:26:36.787 回答