Vue theme dynamic skin change, dynamic skin change can be realized by setting a good color to the color variable of scss.

I wrote vue"s elementui frame skinning scss template, extracted 3 colors as the site"s color matching, my idea is to dynamically change these three colors to achieve dynamic skinning instead of writing multiple scss files to dynamically load class. I"d like to ask how to achieve it.
elementui"s official website seems to have been implemented, and the connection is as follows: https://elementui.github.io/t.
this is the effect I want. You can switch

by selecting a color.
Mar.07,2022

has been solved, refer to https://github.com/ElemeFE/el.


you can only switch several fixed preset colors.
as long as it is built with webpack, you can basically use the plug-in webpack-theme-color-replacer to achieve a real dynamic skin change:
dynamically switch theme colors

Menu