Github项目地址https://github.com/JofunLiang/vue-project-themable-demo
演示地址https://jofunliang.github.io/vue-project-themable-demo/
可行性测试
为了检验方法的可行性,在public文件夹下新建一个themes文件夹,并在themes文件夹新建一个default.css文件:
:root{
--color:red;
}
推荐学习:CSS视频教程
在public文件夹的index.html文件中引入外部样式theme.css,如下:
favicon.ico">
vue-skin-peeler-demoWe'resorrybutvue-skin-peeler-demodoesn'tworkproperlywithoutJavaScriptenabled.Pleaseenableittocontinue.