完善皮肤配置缓存;完善gtk;适配layui2.7;

This commit is contained in:
2022-07-02 17:24:28 +08:00
parent b771cb428e
commit 71959aa588
5 changed files with 25 additions and 14 deletions

View File

@@ -150,8 +150,8 @@ define(["jquery", "easy-admin", "treetable", "iconPickerFa", "autocomplete"], fu
autocomplete.render({
elem: $('#href')[0],
url: ea.url('system.menu/getMenuTips'),
template_val: '{{d.node}}',
template_txt: '{{d.node}} <span class=\'layui-badge layui-bg-gray\'>{{d.title}}</span>',
template_val: '{{-d.node}}',
template_txt: '{{-d.node}} <span class=\'layui-badge layui-bg-gray\'>{{-d.title}}</span>',
onselect: function (resp) {
}
});
@@ -181,8 +181,8 @@ define(["jquery", "easy-admin", "treetable", "iconPickerFa", "autocomplete"], fu
autocomplete.render({
elem: $('#href')[0],
url: ea.url('system.menu/getMenuTips'),
template_val: '{{d.node}}',
template_txt: '{{d.node}} <span class=\'layui-badge layui-bg-gray\'>{{d.title}}</span>',
template_val: '{{-d.node}}',
template_txt: '{{-d.node}} <span class=\'layui-badge layui-bg-gray\'>{{-d.title}}</span>',
onselect: function (resp) {
}
});

View File

@@ -633,3 +633,9 @@
.layui-layer-iframe {
border-radius: 20px;
}
.layuimini-tab .layui-tab-control>li {
background-color: #e1dedb;
border-style : solid;
border-color : #cdc7c2;
}

View File

@@ -1134,3 +1134,8 @@
.elem-style-gtk .layui-layer-iframe {
border-radius: 20px;
}
.elem-style-gtk .layuimini-tab .layui-tab-control > li {
background-color: #e1dedb;
border-style: solid;
border-color: #cdc7c2;
}

View File

@@ -11,9 +11,9 @@ layui.define(['jquery', 'laytpl', 'layer'], function (e) {
system = {
config: {
template: ['<div class="layui-form-autocomplete">', '<dl class="layui-anim layui-anim-upbit">', '</dl>', '</div>'].join(''),
layout: ['<dd data-index="{{d.index}}">{{d.text}}</dd>'].join(''),
template_txt: '{{d.text}}',
template_val: '{{d.value}}',
layout: ['<dd data-index="{{-d.index}}">{{-d.text}}</dd>'].join(''),
template_txt: '{{-d.text}}',
template_val: '{{-d.value}}',
cache: false
},
data: {}

View File

@@ -294,13 +294,13 @@ define(["jquery"], function ($) {
options.bgColorDefault = options.bgColorDefault || 0;
options.elemStyleDefault = options.elemStyleDefault || 'index';
options.listen = options.listen || false;
var bgcolorId = sessionStorage.getItem('layuiminiBgcolorId');
var bgcolorId = localStorage.getItem('layuiminiBgcolorId');
if (bgcolorId === null || bgcolorId === undefined || bgcolorId === '') {
bgcolorId = options.bgColorDefault;
}
miniTheme.buildThemeCss(bgcolorId);
var elemStyleName = sessionStorage.getItem('layuiminiElemStyleName');
var elemStyleName = localStorage.getItem('layuiminiElemStyleName');
if (!elemStyleName) elemStyleName = options.elemStyleDefault;
miniTheme.buildBodyElemStyle(elemStyleName);
@@ -316,7 +316,7 @@ define(["jquery"], function ($) {
elemStyleDefault = elemStyleDefault || 'index';
var elemStyleName = sessionStorage.getItem('layuiminiElemStyleName');
var elemStyleName = localStorage.getItem('layuiminiElemStyleName');
if (!elemStyleName) elemStyleName = elemStyleDefault;
miniTheme.buildBodyElemStyle(elemStyleName);
@@ -436,7 +436,7 @@ define(["jquery"], function ($) {
* @returns {string}
*/
buildBgColorHtml: function (options) {
var bgcolorId = parseInt(sessionStorage.getItem('layuiminiBgcolorId'));
var bgcolorId = parseInt(localStorage.getItem('layuiminiBgcolorId'));
if (isNaN(bgcolorId)) bgcolorId = options.bgColorDefault;
var bgColorConfig = miniTheme.config();
var html = '';
@@ -489,7 +489,7 @@ define(["jquery"], function ($) {
$('body').addClass('elem-style-' + className)
},
buildElemStyleHtml(options) {
var elemStyleName = sessionStorage.getItem('layuiminiElemStyleName');
var elemStyleName = localStorage.getItem('layuiminiElemStyleName');
if (!elemStyleName) elemStyleName = options.elemStyleDefault;
var listElemStyle = miniTheme.configElemStyle()
var html = '';
@@ -560,7 +560,7 @@ define(["jquery"], function ($) {
var bgcolorId = $(this).attr('data-select-bgcolor');
$(this).attr('class', 'layui-this').siblings().removeClass('layui-this');
sessionStorage.setItem('layuiminiBgcolorId', bgcolorId);
localStorage.setItem('layuiminiBgcolorId', bgcolorId);
miniTheme.render({
listen: false,
});
@@ -570,7 +570,7 @@ define(["jquery"], function ($) {
$(this).attr('class', 'layui-this').siblings().removeClass('layui-this');
sessionStorage.setItem('layuiminiElemStyleName', elemStyleName);
localStorage.setItem('layuiminiElemStyleName', elemStyleName);
miniTheme.render({
listen: false,
});