Learn extjs5 with me (10 -- use MVVM features to control menu styles)
There are too many menu styles, so how to flexibly switch between them is a problem. When using the standard menu, there are two buttons at the top of the menu, you can switch to the tree menu and button menu.
In the tree menu display area, you can switch to the standard menu and fold-over menu.
After switching to the button menu:
To switch a menu to a standard menu or tree menu, you need to perform operations in the settings.
Let's take a look at how it is implemented. Because of the complexity of internal processing, I will draw a big picture, and the source code will be published in csdn later.
Now let's look at the runtime diagram of the control that changed the menu style in the settings.
This process is complicated. If you do not understand it, you can download the source code and watch it yourself. The source code can be found in my resources, or you can directly click to open the link for any comments or construction. Please post a message.