3
Extjs菜單隱藏點擊任何項目。即使有人點擊菜單項目,我也想顯示菜單。點擊任何項目時顯示菜單項
小提琴:https://fiddle.sencha.com/#view/editor&fiddle/1nfo
Ext.create('Ext.button.Button', {
text:'menu open',
id: 'todostatusFilter',
renderTo:Ext.getBody(),
menu: {
xtype: 'menu',
id: 'todostatusFilterMenu',
items: [{
text: 'All',
action: 'All',
checked: true,
group: 'todoSortByStatus'
},{
text: 'incomplete',
action: 'Incomplete',
checked: false,
group: 'todoSortByStatus'
}, {
text: 'Complete',
action: 'Complete',
checked: false,
group: 'todoSortByStatus'
}]
}
});
感謝。在隱藏函數之前,有沒有辦法檢查哪個項目被點擊? –
@AjayThakur你可以找到檢查的項目,試試這個:https://fiddle.sencha.com/#view/editor&fiddle/1nfr –