items need to switch themes (not only colors, but also pictures). My current thinking is :
- scss the style of each component is written twice (two themes), and there are also two common component styles, which are extracted to the themes directory;
- main initializes the app_theme of localStorage to white (white theme);
- when loading, through the routing hook afterEach (to,from), using to and app_theme to distinguish, dynamic require which component of what color style, if it is a common component, load all common styles through app_theme.
- when switching, change the app_theme of the Storage and refresh the current page.
what are the drawbacks of this idea, or which god can provide a better idea?