Vue does topic switching.

items need to switch themes (not only colors, but also pictures). My current thinking is :

  1. 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;
  2. main initializes the app_theme of localStorage to white (white theme);
  3. 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.
  4. 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?

Nov.29,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb67c7-25e2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb67c7-25e2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?