How to realize the one-click skinning of the website in the Vue project

how does the Vue project realize one-click skinning on a website

The

item is the less, in which the css style is used and is written in the .vue file
how to change the color of the website with one click


extract the styles involved in skinning-"basicSkin.less, plus other color-*.less, the introduction of basicSkin.less, can be distinguished by introducing all of them, and then setting the color id on the outer layer, or dynamically introduce the style


by judgment.

css Custom attribute + css-vars-ponyfill (solve compatibility)

css Custom attribute: https://developer.mozilla.org.
css-vars-ponyfill: https://github.com/jhildenbid.


change css stylesheet


Vue skinning practice


css-modules + vuex


essence is to modify the stylesheet. There are too many plans, depending on the project, how convenient to come.

Menu