当前位置:网站首页>【若依(ruoyi)】设置主题样式
【若依(ruoyi)】设置主题样式
2022-07-06 02:41:00 【sayyy】
前言
- ruoyi 4.6.0
若依(ruoyi) 的主题样式
在若依(ruoyi)中,可以设置skin和theme。
sys.index.skinName
:主框架页-默认皮肤样式名称,可取值为:蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellowsys.index.sideTheme
:主框架页-侧边栏主题,可取值为:深黑主题theme-dark,浅色主题theme-light,深蓝主题theme-blue
默认主题样式
默认主题样式,与skin-blue
一致。
解决设置主题样式后的主题样式闪动问题
在templates/index.html中的body中添加class:
...
<body class="fixed-sidebar full-height-layout gray-bg" style="overflow: hidden" th:classappend="${@config.getKey('sys.index.skinName') + ' ' + @config.getKey('sys.index.sideTheme')}" >
...
另,找到JavaScript
// 本地主题优先,未设置取系统配置
if($.common.isNotEmpty(skin)){
$("body").addClass(skin.split('|')[0]);
$("body").addClass(skin.split('|')[1]);
} else {
$("body").addClass([[${
sideTheme}]]);
$("body").addClass([[${
skinName}]]);
}
修改为:
// 本地主题优先,未设置取系统配置
if($.common.isNotEmpty(skin)){
$("body").removeClass([[${
sideTheme}]]);
$("body").removeClass([[${
skinName}]]);
$("body").addClass(skin.split('|')[0]);
$("body").addClass(skin.split('|')[1]);
}
参考
http://doc.ruoyi.vip/ruoyi/document/qdsc.html#参数使用
边栏推荐
- 纯Qt版中国象棋:实现双人对战、人机对战及网络对战
- Crawler (9) - scrape framework (1) | scrape asynchronous web crawler framework
- UE4 - how to make a simple TPS role (I) - create a basic role
- 2.13 simulation summary
- How to read excel, PDF and JSON files in R language?
- Sword finger offer 29 Print matrix clockwise
- [Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 12
- C language - Blue Bridge Cup - promised score
- [Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 15
- Universal crud interface
猜你喜欢
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 6
【MySQL 15】Could not increase number of max_ open_ files to more than 10000 (request: 65535)
[untitled] a query SQL execution process in the database
Universal crud interface
Which ecology is better, such as Mi family, graffiti, hilink, zhiting, etc? Analysis of five mainstream smart brands
力扣今日題-729. 我的日程安排錶 I
2022.02.13
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 17
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 7
Deeply analyze the chain 2+1 mode, and subvert the traditional thinking of selling goods?
随机推荐
MySQL winter vacation self-study 2022 11 (8)
一位博士在华为的22年
力扣今日题-729. 我的日程安排表 I
米家、涂鸦、Hilink、智汀等生态哪家强?5大主流智能品牌分析
MySQL (IV) - transactions
I changed the driver to 5.1.35, but it is still the same error. I can succeed even now, but I will report this every time I do an SQL operation
[matlab] access of variables and files
PMP每日一练 | 考试不迷路-7.5
模板_求排列逆序对_基于归并排序
Initial understanding of pointer variables
解决:AttributeError: ‘str‘ object has no attribute ‘decode‘
Briefly describe the implementation principle of redis cluster
Blue Bridge Cup group B provincial preliminaries first question 2013 (Gauss Diary)
Referenceerror: primordials is not defined error resolution
深度解析链动2+1模式,颠覆传统卖货思维?
07 singleton mode
模板_快速排序_双指针
Bigder: I felt good about the 34/100 interview, but I didn't receive the admission
C language - Blue Bridge Cup - promised score
一个复制也能玩出花来