当前位置:网站首页>【若依(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#参数使用
边栏推荐
猜你喜欢

Yyds dry inventory comparison of several database storage engines

How to accurately identify master data?

The third level of C language punch in

GifCam v7.0 极简GIF动画录制工具中文单文件版

Shell script updates stored procedure to database

从顶会论文看2022年推荐系统序列建模的趋势

Sword finger offer 29 Print matrix clockwise

全国大学生信息安全赛创新实践赛初赛---misc(永恒的夜)

Easy to use js script

Sword finger offer 30 Stack containing min function
随机推荐
剑指 Offer 29. 顺时针打印矩阵
继承的构造函数
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 12
MySQL (IV) - transactions
GifCam v7.0 极简GIF动画录制工具中文单文件版
在GBase 8c数据库中使用自带工具检查健康状态时,需要注意什么?
Black high-end responsive website dream weaving template (adaptive mobile terminal)
Introduction to robotframework (I) brief introduction and use
inherited constructors
力扣今日题-729. 我的日程安排表 I
RobotFramework入门(二)appUI自动化之app启动
Déduisez la question d'aujourd'hui - 729. Mon emploi du temps I
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 24
MySQL winter vacation self-study 2022 11 (9)
RobotFramework入门(一)简要介绍及使用
Redis cluster deployment based on redis5
Introduction to robotframework (II) app startup of appui automation
C语言sizeof和strlen的区别
故障分析 | MySQL 耗尽主机内存一例分析
HDU_ p1237_ Simple calculator_ stack