主题色复位
parent
14da7445b5
commit
66001f6401
|
|
@ -1,4 +1,5 @@
|
||||||
layui.define(['table', 'jquery', 'element', 'form', 'pearAuth','pearTab', 'pearMenu', 'pearNotice','pearFrame'], function(exports) {
|
layui.define(['table', 'jquery', 'element', 'form', 'pearAuth', 'pearTab', 'pearMenu', 'pearNotice', 'pearFrame'],
|
||||||
|
function(exports) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var $ = layui.jquery,
|
var $ = layui.jquery,
|
||||||
|
|
@ -29,7 +30,6 @@ layui.define(['table', 'jquery', 'element', 'form', 'pearAuth','pearTab', 'pearM
|
||||||
this.noticeRender(option);
|
this.noticeRender(option);
|
||||||
|
|
||||||
this.permissionRender(option);
|
this.permissionRender(option);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.permissionRender = function(option) {
|
this.permissionRender = function(option) {
|
||||||
|
|
@ -71,7 +71,9 @@ layui.define(['table', 'jquery', 'element', 'form', 'pearAuth','pearTab', 'pearM
|
||||||
title: '消息', //标题
|
title: '消息', //标题
|
||||||
area: ['390px', '330px'], //宽高
|
area: ['390px', '330px'], //宽高
|
||||||
shade: 0.4, //遮罩透明度
|
shade: 0.4, //遮罩透明度
|
||||||
content: "<div style='background-color:whitesmoke;'><div class='layui-card'><div class='layui-card-body'>发件人 : "+form+"</div><div class='layui-card-header' >标题 : "+title+"</div><div class='layui-card-body' >内容 : "+context+"</div></div></div>",//支持获取DOM元素
|
content: "<div style='background-color:whitesmoke;'><div class='layui-card'><div class='layui-card-body'>发件人 : " +
|
||||||
|
form + "</div><div class='layui-card-header' >标题 : " + title +
|
||||||
|
"</div><div class='layui-card-body' >内容 : " + context + "</div></div></div>", //支持获取DOM元素
|
||||||
btn: ['确认'], //按钮组
|
btn: ['确认'], //按钮组
|
||||||
scrollbar: false, //屏蔽浏览器滚动条
|
scrollbar: false, //屏蔽浏览器滚动条
|
||||||
yes: function(index) { //layer.msg('yes'); //点击确定回调
|
yes: function(index) { //layer.msg('yes'); //点击确定回调
|
||||||
|
|
@ -210,6 +212,14 @@ layui.define(['table', 'jquery', 'element', 'form', 'pearAuth','pearTab', 'pearM
|
||||||
// 自 定 义 加 载 配 色
|
// 自 定 义 加 载 配 色
|
||||||
style += '#preloader{background-color:' + color + '!important;}';
|
style += '#preloader{background-color:' + color + '!important;}';
|
||||||
|
|
||||||
|
|
||||||
|
// 自 定 义 样 式 选 择 边 框 配 色
|
||||||
|
style +=
|
||||||
|
'.pearone-color .color-content li.layui-this:after, .pearone-color .color-content li:hover:after {border: ' +
|
||||||
|
color + ' 2px solid!important;}';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 自 定 义 滚 动 条 样 式
|
// 自 定 义 滚 动 条 样 式
|
||||||
|
|
||||||
localStorage.setItem("theme-color", color);
|
localStorage.setItem("theme-color", color);
|
||||||
|
|
@ -380,14 +390,40 @@ layui.define(['table', 'jquery', 'element', 'form', 'pearAuth','pearTab', 'pearM
|
||||||
|
|
||||||
$("body").on("click", ".setting", function() {
|
$("body").on("click", ".setting", function() {
|
||||||
|
|
||||||
var bgColorHtml =
|
// 获取
|
||||||
'<li class="layui-this" data-select-bgcolor="dark-theme">' +
|
var themeMenu = localStorage.getItem("theme-menu");
|
||||||
|
|
||||||
|
var themeColor = localStorage.getItem("theme-color");
|
||||||
|
|
||||||
|
var bgColorHtml = "";
|
||||||
|
|
||||||
|
if (themeMenu == "light-theme") {
|
||||||
|
|
||||||
|
bgColorHtml +=
|
||||||
|
'<li data-select-bgcolor="dark-theme">' +
|
||||||
'<a href="javascript:;" data-skin="skin-blue" style="" class="clearfix full-opacity-hover">' +
|
'<a href="javascript:;" data-skin="skin-blue" style="" class="clearfix full-opacity-hover">' +
|
||||||
'<div><span style="display:block; width: 20%; float: left; height: 12px; background: #28333E;"></span><span style="display:block; width: 80%; float: left; height: 12px; background: white;"></span></div>' +
|
'<div><span style="display:block; width: 20%; float: left; height: 12px; background: #28333E;"></span><span style="display:block; width: 80%; float: left; height: 12px; background: white;"></span></div>' +
|
||||||
'<div><span style="display:block; width: 20%; float: left; height: 40px; background: #28333E;"></span><span style="display:block; width: 80%; float: left; height: 40px; background: #f4f5f7;"></span></div>' +
|
'<div><span style="display:block; width: 20%; float: left; height: 40px; background: #28333E;"></span><span style="display:block; width: 80%; float: left; height: 40px; background: #f4f5f7;"></span></div>' +
|
||||||
'</a>' +
|
'</a>' +
|
||||||
'</li>';
|
'</li>';
|
||||||
|
|
||||||
|
bgColorHtml +=
|
||||||
|
'<li class="layui-this" data-select-bgcolor="light-theme">' +
|
||||||
|
'<a href="javascript:;" data-skin="skin-blue" style="" class="clearfix full-opacity-hover">' +
|
||||||
|
'<div><span style="display:block; width: 20%; float: left; height: 12px; background: white;"></span><span style="display:block; width: 80%; float: left; height: 12px; background: white;"></span></div>' +
|
||||||
|
'<div><span style="display:block; width: 20%; float: left; height: 40px; background: white;"></span><span style="display:block; width: 80%; float: left; height: 40px; background: #f4f5f7;"></span></div>' +
|
||||||
|
'</a>' +
|
||||||
|
'</li>';
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
bgColorHtml +=
|
||||||
|
'<li class="layui-this" data-select-bgcolor="dark-theme">' +
|
||||||
|
'<a href="javascript:;" data-skin="skin-blue" style="" class="clearfix full-opacity-hover">' +
|
||||||
|
'<div><span style="display:block; width: 20%; float: left; height: 12px; background: #28333E;"></span><span style="display:block; width: 80%; float: left; height: 12px; background: white;"></span></div>' +
|
||||||
|
'<div><span style="display:block; width: 20%; float: left; height: 40px; background: #28333E;"></span><span style="display:block; width: 80%; float: left; height: 40px; background: #f4f5f7;"></span></div>' +
|
||||||
|
'</a>' +
|
||||||
|
'</li>';
|
||||||
|
|
||||||
bgColorHtml +=
|
bgColorHtml +=
|
||||||
'<li data-select-bgcolor="light-theme">' +
|
'<li data-select-bgcolor="light-theme">' +
|
||||||
|
|
@ -397,6 +433,8 @@ layui.define(['table', 'jquery', 'element', 'form', 'pearAuth','pearTab', 'pearM
|
||||||
'</a>' +
|
'</a>' +
|
||||||
'</li>';
|
'</li>';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
var html =
|
var html =
|
||||||
'<div class="pearone-color">\n' +
|
'<div class="pearone-color">\n' +
|
||||||
'<div class="color-title">整体风格</div>\n' +
|
'<div class="color-title">整体风格</div>\n' +
|
||||||
|
|
@ -407,7 +445,7 @@ layui.define(['table', 'jquery', 'element', 'form', 'pearAuth','pearTab', 'pearM
|
||||||
|
|
||||||
|
|
||||||
html +=
|
html +=
|
||||||
"<div class='select-color'><div class='select-color-title'>主题色</div><div class='select-color-content'><span class='select-color-item layui-icon layui-icon-ok' style='background-color:#FF5722;'></span><span class='select-color-item' style='background-color:#5FB878;'></span><span class='select-color-item' style='background-color:#1E9FFF;'></span><span class='select-color-item' style='background-color:#FFB800;'></span><span class='select-color-item' style='background-color:darkgray;'></span></div></div>"
|
"<div class='select-color'><div class='select-color-title'>主题色</div><div class='select-color-content'><span class='select-color-item ' style='background-color:#FF5722;'></span><span class='select-color-item layui-icon layui-icon-ok' style='background-color:#5FB878;'></span><span class='select-color-item' style='background-color:#1E9FFF;'></span><span class='select-color-item' style='background-color:#FFB800;'></span><span class='select-color-item' style='background-color:darkgray;'></span></div></div>"
|
||||||
|
|
||||||
html += '<div class="more-menu-list">' +
|
html += '<div class="more-menu-list">' +
|
||||||
'<a class="more-menu-item" href="http://www.pearadmin.cn/doc/" target="_blank">' +
|
'<a class="more-menu-item" href="http://www.pearadmin.cn/doc/" target="_blank">' +
|
||||||
|
|
@ -443,6 +481,21 @@ layui.define(['table', 'jquery', 'element', 'form', 'pearAuth','pearTab', 'pearM
|
||||||
move: false,
|
move: false,
|
||||||
content: html,
|
content: html,
|
||||||
success: function(layero, index) {
|
success: function(layero, index) {
|
||||||
|
|
||||||
|
var color = localStorage.getItem("theme-color");
|
||||||
|
|
||||||
|
if (color!="null") {
|
||||||
|
|
||||||
|
$(".select-color-item").removeClass("layui-icon")
|
||||||
|
.removeClass("layui-icon-ok");
|
||||||
|
|
||||||
|
$(".select-color-item").each(function() {
|
||||||
|
if ($(this).css("background-color") === color) {
|
||||||
|
$(this).addClass("layui-icon").addClass("layui-icon-ok");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
$('#layui-layer-shade' + index).click(function() {
|
$('#layui-layer-shade' + index).click(function() {
|
||||||
var $layero = $('#layui-layer' + index);
|
var $layero = $('#layui-layer' + index);
|
||||||
$layero.animate({
|
$layero.animate({
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,7 @@
|
||||||
|
|
||||||
<div class="layui-carousel" id="test1">
|
<div class="layui-carousel" id="test1">
|
||||||
<div carousel-item>
|
<div carousel-item>
|
||||||
<div><a target="_blank" href="http://jmysy.gitee.io/"><img src="../../admin/images/designModel.png" style="width: 100%;height: 100%;margin: 0px;"></a></div>
|
<div><a target="_blank" href="https://www.jmys.club/"><img src="../../admin/images/designModel.png" style="width: 100%;height: 100%;margin: 0px;"></a></div>
|
||||||
<div><a target="_blank" href="https://blog.yuqiyu.com"><img src="../../admin/images/springboot.png" style="width: 100%;height: 100%;margin: 0px;"></a></div>
|
<div><a target="_blank" href="https://blog.yuqiyu.com"><img src="../../admin/images/springboot.png" style="width: 100%;height: 100%;margin: 0px;"></a></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue