当前位置:网站首页>Nuxt configuration topic switching
Nuxt configuration topic switching
2022-07-26 06:15:00 【sunyin.liu】
Ideas
- By giving
bodyAdd methods with different class names , To switch . - Colors corresponding to each theme , Configured in a
lessIn file lessDefine a method in the file , This method can generate all styles circularly- Style part of each component , Use this method to generate styles for all themes
1. introduce less, modify package.json
"devDependencies": {
...
"less": "^2.7.2",
"less-loader": "^4.0.3",
...
}2. stay ass/css/ Add under directory theme.less file
@themes: theme-green, theme-red;
@theme-green-mc: #4AD991;
@theme-red-mc: red;
.setTheme() {
.loop(@i) when (@i < length(@themes)+1){
@theme: extract(@themes, @i);
@mc: '@{theme}-mc';
[email protected]{theme}{
.theme(@@mc);
}
.loop(@i+1);
}
.loop(1);
}3. The code of the style part of the component is as follows
边栏推荐
- Concurrency opening -- take you from 0 to 1 to build the cornerstone of concurrency knowledge system
- Xiao He shows his sharp corners and says hello to flutter app
- 【Day_07 0425】合法括号序列判断
- [2023 Jerry technology approval test questions in advance] ~ questions and reference answers
- [Hangzhou][15k-20k] medical diagnosis company recruits golang development engineers without overtime! No overtime! No overtime!
- 【Day04_0421】C语言选择题
- YOLOv6:又快又准的目标检测框架开源啦
- 【Oracle SQL】计算同比与环比(列转行进行偏移)
- redis 哨兵集群搭建
- Kingbasees SQL language reference manual of Jincang database (10. Query and sub query)
猜你喜欢

Code Runner for VS Code,下载量突破 4000 万!支持超过50种语言

递归函数中 有两个递归入口的时间复杂度

Excitation method and excitation voltage of hand-held vibrating wire vh501tc acquisition instrument

Matlab 向量与矩阵

时序动作定位 | 用于弱监督时态动作定位的细粒度时态对比学习(CVPR 2022)

递归处理——子问题

How can machinery manufacturing enterprises do well in production management with the help of ERP system?

Amd zen4 game God u reached 208mb cache within this year, which is unprecedented

Youwei low code: Brick life cycle component life cycle

flex布局
随机推荐
What is spark serialization for?
[day_050422] statistical palindrome
Mysql45 talks about transaction isolation: why can't I see it after you change it?
Interpretation of TPS motion (cvpr2022) video generation paper
[day04_0421] C language multiple choice questions
nuxt 配置主题切换
【BM2 链表内指定区间反转】
[Hangzhou][15k-20k] medical diagnosis company recruits golang development engineers without overtime! No overtime! No overtime!
Understanding the mathematical essence of machine learning
flex布局
YOLOv6:又快又准的目标检测框架开源啦
[day_070425] Fibonacci series
【Day_06 0423】把字符串转换成整数
Calling mode and execution sequence of JS
[day_040421] calculate candy
Read five articles in the evening | Economic Daily: don't treat digital collections as wealth making products
【Day_02 0419】倒置字符串
Should we test the Dao layer?
多目标检测
How can machinery manufacturing enterprises do well in production management with the help of ERP system?