简体   繁体   English

工具栏中的菜单-Ext-JS 4

[英]Menu in Toolbar - Ext-JS 4

When I press button, I want a menu but it's not working and when I press the button, nothing happens. 当我按下按钮时,我想要一个菜单​​,但是它不起作用,当我按下按钮时,什么也没有发生。 Here is the code: 这是代码:

{
                    xtype: 'button',
                    text: 'menu',
                    menu: Ext.create('Ext.menu.Menu', {
                            width: 100,
                            plain: true,
                            floating: false,  // usually you want this set to True (default)
                            renderTo: Ext.getBody(),
                            items: [{
                                    text: 'plain item 1'
                                },{
                                    text: 'plain item 2'
                                },{
                                    text: 'plain item 3'
                            }]
                        })
                },

Where is the problem? 问题出在哪儿?

SOLVED: 解决了:

Just deleted floating: false. 刚刚删除的浮动:false。 :) :)

SOLVED 解决了

Just deleted floating: false. 刚刚删除的浮动:false。 :) :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM