16,874
个编辑
LLWiki正在建设中,欢迎加入我们!
小 |
小 |
||
if (unselectable) { menu.on('toggle', function(visible) { if (visible) { menu.unselectItem(); } }); }
if (!hasClick) { return menu; }
return menu.on('choose', function(item, selected) {
if (!selected) { return; }
const option = options.find(function(e) { return e.text == item.getLabel(); });
menu.setHorizontalPosition( menu.horizontalPosition == 'start' ? 'end' : 'start' );
});
};
|