更改文件名

pull/1/head
iamsongpeng 2020-03-03 16:55:19 +08:00
parent f63f51dc7b
commit d022001e0a
17 changed files with 191 additions and 191 deletions

View File

@ -7,18 +7,18 @@ body {
background: #f2f2f2; background: #f2f2f2;
} }
.layuimini-container { .splayui-container {
border: 1px solid #f2f2f2; border: 1px solid #f2f2f2;
border-radius: 5px; border-radius: 5px;
background-color: #ffffff; background-color: #ffffff;
} }
.layuimini-main { .splayui-main {
margin: 10px 10px 10px 10px; margin: 10px 10px 10px 10px;
} }
/**必填红点 */ /**必填红点 */
.layuimini-form .layui-form-item > .sp-required:after { .splayui-form .layui-form-item > .sp-required:after {
content: "*"; content: "*";
color: red; color: red;
position: absolute; position: absolute;
@ -29,15 +29,15 @@ body {
right: 5px; right: 5px;
} }
.layuimini-form .layui-form-item > .layui-form-label { .splayui-form .layui-form-item > .layui-form-label {
width: 120px !important; width: 120px !important;
} }
.layuimini-form > .layui-form-item > .layui-input-block { .splayui-form > .layui-form-item > .layui-input-block {
margin-left: 150px !important; margin-left: 150px !important;
} }
.layuimini-form .layui-form-item > .layui-input-block > tip { .splayui-form .layui-form-item > .layui-input-block > tip {
display: inline-block; display: inline-block;
margin-top: 10px; margin-top: 10px;
line-height: 10px; line-height: 10px;

View File

@ -6,7 +6,7 @@
background-color: #1aa094 !important; background-color: #1aa094 !important;
} }
.layui-header > ul > .layui-nav-item.layui-this, .layui-header > ul > .layui-nav-item.layui-this,
.layuimini-tool i:hover { .splayui-tool i:hover {
background-color: #197971 !important; background-color: #197971 !important;
} }
/**logo-配色*/ /**logo-配色*/
@ -59,7 +59,7 @@
} }
/**头部样式(缩放) */ /**头部样式(缩放) */
.layuimini-mini .layui-layout-left.layui-header-menu.layui-hide-xs { .splayui-mini .layui-layout-left.layui-header-menu.layui-hide-xs {
left: 155px !important; left: 155px !important;
} }
@ -89,15 +89,15 @@
} }
/**logo演示缩放 */ /**logo演示缩放 */
.layuimini-mini .layui-layout-admin .layui-logo { .splayui-mini .layui-layout-admin .layui-logo {
width: 60px !important; width: 60px !important;
} }
.layuimini-mini .layui-layout-admin .layui-logo h1 { .splayui-mini .layui-layout-admin .layui-logo h1 {
display: none; display: none;
} }
/**缩放工具(通用) */ /**缩放工具(通用) */
.layuimini-tool { .splayui-tool {
position: absolute !important; position: absolute !important;
top: 0; top: 0;
left: 235px; left: 235px;
@ -109,10 +109,10 @@
transition: all 0.2s; transition: all 0.2s;
} }
/**缩放工具(缩放) */ /**缩放工具(缩放) */
.layuimini-mini .layuimini-tool { .splayui-mini .splayui-tool {
left: 95px !important; left: 95px !important;
} }
.layuimini-tool i { .splayui-tool i {
display: block; display: block;
color: #fff; color: #fff;
width: 32px; width: 32px;
@ -242,14 +242,14 @@
right: 15px; right: 15px;
} }
/**左侧菜单栏 (正常) */ /**左侧菜单栏 (正常) */
.layuimini-all .layui-nav-itemed .layui-nav-child a, .splayui-all .layui-nav-itemed .layui-nav-child a,
.layuimini-all .layui-left-menu .layui-nav .layui-nav-child a { .splayui-all .layui-left-menu .layui-nav .layui-nav-child a {
padding-left: 35px; padding-left: 35px;
} }
.layuimini-all .layui-left-menu .layui-nav .layui-nav-child .layui-nav-child a { .splayui-all .layui-left-menu .layui-nav .layui-nav-child .layui-nav-child a {
padding-left: 45px; padding-left: 45px;
} }
.layuimini-all .splayui-all
.layui-left-menu .layui-left-menu
.layui-nav .layui-nav
.layui-nav-child .layui-nav-child
@ -258,7 +258,7 @@
a { a {
padding-left: 55px; padding-left: 55px;
} }
.layuimini-all .splayui-all
.layui-left-menu .layui-left-menu
.layui-nav .layui-nav
.layui-nav-child .layui-nav-child
@ -268,7 +268,7 @@
a { a {
padding-left: 65px; padding-left: 65px;
} }
.layuimini-all .splayui-all
.layui-left-menu .layui-left-menu
.layui-nav .layui-nav
.layui-nav-itemed .layui-nav-itemed
@ -276,20 +276,20 @@
padding: 5px 0; padding: 5px 0;
} }
/**左侧菜单栏(缩放) */ /**左侧菜单栏(缩放) */
.layuimini-mini .layui-side.layui-bg-black, .splayui-mini .layui-side.layui-bg-black,
.layuimini-mini .layui-left-menu, .splayui-mini .layui-left-menu,
.layuimini-mini .layui-left-menu > ul, .splayui-mini .layui-left-menu > ul,
.layuimini-mini .layui-left-menu > ul li i { .splayui-mini .layui-left-menu > ul li i {
width: 60px !important; width: 60px !important;
} }
.layuimini-mini .layui-left-menu > ul li span:first-child { .splayui-mini .layui-left-menu > ul li span:first-child {
display: none; display: none;
} }
.layuimini-mini .layui-left-menu > ul li span:last-child { .splayui-mini .layui-left-menu > ul li span:last-child {
float: right; float: right;
right: 7px; right: 7px;
} }
.layuimini-mini .layui-left-menu .layui-nav .layui-nav-item a { .splayui-mini .layui-left-menu .layui-nav .layui-nav-item a {
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
padding-right: 0px !important; padding-right: 0px !important;
@ -303,24 +303,24 @@
transition: all 0.2s; transition: all 0.2s;
} }
/**内容主体(缩放) */ /**内容主体(缩放) */
.layuimini-mini .layui-layout-admin .layui-body { .splayui-mini .layui-layout-admin .layui-body {
left: 60px !important; left: 60px !important;
} }
/**选择配色方案 */ /**选择配色方案 */
.layuimini-color .color-title { .splayui-color .color-title {
padding: 10px 0 10px 20px; padding: 10px 0 10px 20px;
border-bottom: 1px solid #d9dada; border-bottom: 1px solid #d9dada;
margin-bottom: 8px; margin-bottom: 8px;
} }
.layuimini-color .color-content { .splayui-color .color-content {
padding: 0 5px 0 5px; padding: 0 5px 0 5px;
} }
.layuimini-color .color-content ul { .splayui-color .color-content ul {
list-style: none; list-style: none;
text-align: center; text-align: center;
} }
.layuimini-color .color-content ul li { .splayui-color .color-content ul li {
position: relative; position: relative;
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;
@ -333,8 +333,8 @@
font-size: 12px; font-size: 12px;
color: #666; color: #666;
} }
.layuimini-color .color-content li.layui-this:after, .splayui-color .color-content li.layui-this:after,
.layuimini-color .color-content li:hover:after { .splayui-color .color-content li:hover:after {
width: 100%; width: 100%;
height: 100%; height: 100%;
padding: 4px; padding: 4px;
@ -343,7 +343,7 @@
border-color: #d8d8d8; border-color: #d8d8d8;
opacity: 1; opacity: 1;
} }
.layuimini-color .color-content li:after { .splayui-color .color-content li:after {
content: ""; content: "";
position: absolute; position: absolute;
z-index: 20; z-index: 20;
@ -415,22 +415,22 @@
.layui-layout-admin .layui-body .layui-tab-item.layui-show { .layui-layout-admin .layui-body .layui-tab-item.layui-show {
border-top: 1px solid #e2e2e2; border-top: 1px solid #e2e2e2;
} }
.layuimini-mini .layuimini-tool { .splayui-mini .splayui-tool {
left: 15px !important; left: 15px !important;
} }
.layuimini-tool i:hover { .splayui-tool i:hover {
background-color: transparent !important; background-color: transparent !important;
} }
.layuimini-all .layui-layout-left.layui-header-menu { .splayui-all .layui-layout-left.layui-header-menu {
transition: all 0.2s; transition: all 0.2s;
float: right; float: right;
right: 5px; right: 5px;
} }
.layuimini-all .layui-header-menu > .layui-nav-item { .splayui-all .layui-header-menu > .layui-nav-item {
float: right; float: right;
right: 0px; right: 0px;
} }
.layuimini-mini .layui-layout-left.layui-header-menu { .splayui-mini .layui-layout-left.layui-header-menu {
left: 50px !important; left: 50px !important;
transition: all 0.2s; transition: all 0.2s;
} }
@ -439,16 +439,16 @@
} }
.layui-layout-admin .layui-layout-admin
.layui-nav.layui-layout-right .layui-nav.layui-layout-right
> li:not(.layuimini-setting) { > li:not(.splayui-setting) {
width: 40px !important; width: 40px !important;
} }
.layui-layout-admin .layui-layout-admin
.layui-nav.layui-layout-right .layui-nav.layui-layout-right
> li:not(.layuimini-setting) > li:not(.splayui-setting)
a { a {
padding: 0 15px; padding: 0 15px;
} }
.layuimini-mini .layui-layout-admin .layui-body { .splayui-mini .layui-layout-admin .layui-body {
left: 0px !important; left: 0px !important;
} }
.layui-layout-admin .layui-body .clildFrame.layui-tab-content { .layui-layout-admin .layui-body .clildFrame.layui-tab-content {
@ -461,10 +461,10 @@
word-break: break-all; word-break: break-all;
-webkit-overflow-scrolling: touch !important; -webkit-overflow-scrolling: touch !important;
} }
.layuimini-all .layui-nav.layui-layout-right, .splayui-all .layui-nav.layui-layout-right,
.layuimini-mini .layui-layout-admin .layui-logo, .splayui-mini .layui-layout-admin .layui-logo,
.layuimini-mini .layui-side.layui-bg-black, .splayui-mini .layui-side.layui-bg-black,
.layuimini-mini .layui-left-menu, .splayui-mini .layui-left-menu,
.layui-layout-admin .layui-body #top_tabs, .layui-layout-admin .layui-body #top_tabs,
.layui-layout-admin .layui-body .layui-nav.closeBox { .layui-layout-admin .layui-body .layui-nav.closeBox {
transition: all 0.2s; transition: all 0.2s;

View File

@ -12,8 +12,8 @@ layui.config({
base: rootPath, base: rootPath,
version: true version: true
}).extend({ }).extend({
// layuimini扩展 // layui扩展
layuimini: "layuimini/layuimini", splayui: "splayui/splayui",
// 分步表单扩展 // 分步表单扩展
step: 'step-lay/step', step: 'step-lay/step',
//table树形扩展 //table树形扩展

View File

@ -1,7 +1,7 @@
/** /**
* date:2019/06/10 * date:2019/06/10
* author:Mr.Chung * author:Mr.Chung
* description:layuimini 框架扩展 * description:splayui 框架扩展
*/ */
layui.define(["element", "jquery"], function (exports) { layui.define(["element", "jquery"], function (exports) {
var element = layui.element, var element = layui.element,
@ -13,7 +13,7 @@ layui.define(["element", "jquery"], function (exports) {
return layer.alert("请先将项目部署至web容器Apache/Tomcat/Nginx/IIS/等),否则部分数据将无法显示"); return layer.alert("请先将项目部署至web容器Apache/Tomcat/Nginx/IIS/等),否则部分数据将无法显示");
} }
layuimini = new function () { splayui = new function () {
/** /**
* 系统配置 * 系统配置
@ -42,20 +42,20 @@ layui.define(["element", "jquery"], function (exports) {
*/ */
this.init = function (url) { this.init = function (url) {
var loading = layer.load(0, {shade: false, time: 2 * 1000}); var loading = layer.load(0, {shade: false, time: 2 * 1000});
layuimini.initBgColor(); splayui.initBgColor();
layuimini.initDevice(); splayui.initDevice();
$.getJSON(url, function (data, status) { $.getJSON(url, function (data, status) {
if (!data.data) { if (!data.data) {
layuimini.msg_error('暂无菜单信息'); splayui.msg_error('暂无菜单信息');
} else { } else {
layuimini.initHome(data.data.homeInfo); splayui.initHome(data.data.homeInfo);
layuimini.initLogo(data.data.logoInfo); splayui.initLogo(data.data.logoInfo);
layuimini.initClear(data.data.clearInfo); splayui.initClear(data.data.clearInfo);
layuimini.initMenu(data.data.menuInfo); splayui.initMenu(data.data.menuInfo);
layuimini.initTab(); splayui.initTab();
} }
}).fail(function () { }).fail(function () {
layuimini.msg_error('菜单接口有误'); splayui.msg_error('菜单接口有误');
}); });
layer.close(loading); layer.close(loading);
}; };
@ -64,10 +64,10 @@ layui.define(["element", "jquery"], function (exports) {
* 初始化设备端 * 初始化设备端
*/ */
this.initDevice = function () { this.initDevice = function () {
if (layuimini.checkMobile()) { if (splayui.checkMobile()) {
$('.layuimini-tool i').attr('data-side-fold', 0); $('.splayui-tool i').attr('data-side-fold', 0);
$('.layuimini-tool i').attr('class', 'fa fa-indent'); $('.splayui-tool i').attr('class', 'fa fa-indent');
$('.layui-layout-body').attr('class', 'layui-layout-body layuimini-mini'); $('.layui-layout-body').attr('class', 'layui-layout-body splayui-mini');
} }
}; };
@ -76,10 +76,10 @@ layui.define(["element", "jquery"], function (exports) {
* @param data * @param data
*/ */
this.initHome = function (data) { this.initHome = function (data) {
sessionStorage.setItem('layuiminiHomeHref', data.url); sessionStorage.setItem('splayuiHomeHref', data.url);
$('#layuiminiHomeTabId').html('<i class="' + data.icon + '"></i> <span>' + data.name + '</span>'); $('#splayuiHomeTabId').html('<i class="' + data.icon + '"></i> <span>' + data.name + '</span>');
$('#layuiminiHomeTabId').attr('lay-id', data.url); $('#splayuiHomeTabId').attr('lay-id', data.url);
$('#layuiminiHomeTabIframe').html('<iframe width="100%" height="100%" frameborder="0" src="' + data.url + '"></iframe>'); $('#splayuiHomeTabIframe').html('<iframe width="100%" height="100%" frameborder="0" src="' + data.url + '"></iframe>');
}; };
/** /**
@ -99,27 +99,27 @@ layui.define(["element", "jquery"], function (exports) {
* @param data * @param data
*/ */
this.initClear = function (data) { this.initClear = function (data) {
$('.layuimini-clear').attr('data-href', data.clearUrl); $('.splayui-clear').attr('data-href', data.clearUrl);
}; };
/** /**
* 初始化背景色 * 初始化背景色
*/ */
this.initBgColor = function () { this.initBgColor = function () {
var bgcolorId = sessionStorage.getItem('layuiminiBgcolorId'); var bgcolorId = sessionStorage.getItem('splayuiBgcolorId');
if (bgcolorId == null || bgcolorId == undefined || bgcolorId == '') { if (bgcolorId == null || bgcolorId == undefined || bgcolorId == '') {
bgcolorId = layuimini.config('BgColorDefault'); bgcolorId = splayui.config('BgColorDefault');
} }
var bgcolorData = layuimini.bgColorConfig(bgcolorId); var bgcolorData = splayui.bgColorConfig(bgcolorId);
var styleHtml = '.layui-layout-admin .layui-header{background-color:' + bgcolorData.headerRight + '!important;}\n' + var styleHtml = '.layui-layout-admin .layui-header{background-color:' + bgcolorData.headerRight + '!important;}\n' +
'.layui-header>ul>.layui-nav-item.layui-this,.layuimini-tool i:hover{background-color:' + bgcolorData.headerRightThis + '!important;}\n' + '.layui-header>ul>.layui-nav-item.layui-this,.splayui-tool i:hover{background-color:' + bgcolorData.headerRightThis + '!important;}\n' +
'.layui-layout-admin .layui-logo {background-color:' + bgcolorData.headerLogo + '!important;}\n' + '.layui-layout-admin .layui-logo {background-color:' + bgcolorData.headerLogo + '!important;}\n' +
'.layui-side.layui-bg-black,.layui-side.layui-bg-black>.layui-left-menu>ul {background-color:' + bgcolorData.menuLeft + '!important;}\n' + '.layui-side.layui-bg-black,.layui-side.layui-bg-black>.layui-left-menu>ul {background-color:' + bgcolorData.menuLeft + '!important;}\n' +
'.layui-left-menu .layui-nav .layui-nav-child a:hover:not(.layui-this) {background-color:' + bgcolorData.menuLeftHover + ';}\n' + '.layui-left-menu .layui-nav .layui-nav-child a:hover:not(.layui-this) {background-color:' + bgcolorData.menuLeftHover + ';}\n' +
'.layui-layout-admin .layui-nav-tree .layui-this, .layui-layout-admin .layui-nav-tree .layui-this>a, .layui-layout-admin .layui-nav-tree .layui-nav-child dd.layui-this, .layui-layout-admin .layui-nav-tree .layui-nav-child dd.layui-this a {\n' + '.layui-layout-admin .layui-nav-tree .layui-this, .layui-layout-admin .layui-nav-tree .layui-this>a, .layui-layout-admin .layui-nav-tree .layui-nav-child dd.layui-this, .layui-layout-admin .layui-nav-tree .layui-nav-child dd.layui-this a {\n' +
' background-color: ' + bgcolorData.menuLeftThis + ' !important;\n' + ' background-color: ' + bgcolorData.menuLeftThis + ' !important;\n' +
'}'; '}';
$('#layuimini-bg-color').html(styleHtml); $('#splayui-bg-color').html(styleHtml);
}; };
/** /**
@ -186,13 +186,13 @@ layui.define(["element", "jquery"], function (exports) {
var href = urlArr.pop(); var href = urlArr.pop();
// 判断链接是否有效 // 判断链接是否有效
var checkUrl = layuimini.checkUrl(href); var checkUrl = splayui.checkUrl(href);
if (checkUrl != true) { if (checkUrl != true) {
return layuimini.msg_error(checkUrl); return splayui.msg_error(checkUrl);
} }
// 判断tab是否存在 // 判断tab是否存在
var checkTab = layuimini.checkTab(href); var checkTab = splayui.checkTab(href);
if (!checkTab) { if (!checkTab) {
var title = href, var title = href,
tabId = href; tabId = href;
@ -200,7 +200,7 @@ layui.define(["element", "jquery"], function (exports) {
var checkHref = $(this).attr("data-tab"); var checkHref = $(this).attr("data-tab");
// 判断是否带参数了 // 判断是否带参数了
if (layuimini.config('urlSuffixDefault')) { if (splayui.config('urlSuffixDefault')) {
if (href.indexOf("mpi=") > -1) { if (href.indexOf("mpi=") > -1) {
var menuParameId = $(this).attr('data-tab-mpi'); var menuParameId = $(this).attr('data-tab-mpi');
if (checkHref.indexOf("?") > -1) { if (checkHref.indexOf("?") > -1) {
@ -244,28 +244,28 @@ layui.define(["element", "jquery"], function (exports) {
addMenuClass($(this).parent(), 1); addMenuClass($(this).parent(), 1);
} }
}); });
var layuiminiHomeTab = $('#layuiminiHomeTab').attr('lay-id'), var splayuiHomeTab = $('#splayuiHomeTab').attr('lay-id'),
layuiminiHomeHref = sessionStorage.getItem('layuiminiHomeHref'); splayuiHomeHref = sessionStorage.getItem('splayuiHomeHref');
// 非菜单打开的tab窗口 // 非菜单打开的tab窗口
if (href == title) { if (href == title) {
var layuiminiTabInfo = JSON.parse(sessionStorage.getItem("layuiminiTabInfo")); var splayuiTabInfo = JSON.parse(sessionStorage.getItem("splayuiTabInfo"));
if (layuiminiTabInfo != null) { if (splayuiTabInfo != null) {
var check = layuiminiTabInfo[tabId]; var check = splayuiTabInfo[tabId];
if (check != undefined || check != null) { if (check != undefined || check != null) {
title = check['title']; title = check['title'];
} }
} }
} }
if (layuiminiHomeTab != href && layuiminiHomeHref != href) { if (splayuiHomeTab != href && splayuiHomeHref != href) {
layuimini.addTab(tabId, href, title, true); splayui.addTab(tabId, href, title, true);
layuimini.changeTab(tabId); splayui.changeTab(tabId);
} }
} }
} }
if (layuimini.config('urlHashLocation')) { if (splayui.config('urlHashLocation')) {
layuimini.hashTab(); splayui.hashTab();
} }
}; };
@ -387,11 +387,11 @@ layui.define(["element", "jquery"], function (exports) {
*/ */
this.buildBgColorHtml = function () { this.buildBgColorHtml = function () {
var html = ''; var html = '';
var bgcolorId = sessionStorage.getItem('layuiminiBgcolorId'); var bgcolorId = sessionStorage.getItem('splayuiBgcolorId');
if (bgcolorId == null || bgcolorId == undefined || bgcolorId == '') { if (bgcolorId == null || bgcolorId == undefined || bgcolorId == '') {
bgcolorId = 0; bgcolorId = 0;
} }
var bgColorConfig = layuimini.bgColorConfig(); var bgColorConfig = splayui.bgColorConfig();
$.each(bgColorConfig, function (key, val) { $.each(bgColorConfig, function (key, val) {
if (key == bgcolorId) { if (key == bgcolorId) {
html += '<li class="layui-this" data-select-bgcolor="' + key + '">\n'; html += '<li class="layui-this" data-select-bgcolor="' + key + '">\n';
@ -434,11 +434,11 @@ layui.define(["element", "jquery"], function (exports) {
} }
// 判断sessionStorage是否有 // 判断sessionStorage是否有
var layuiminiTabInfo = JSON.parse(sessionStorage.getItem("layuiminiTabInfo")); var splayuiTabInfo = JSON.parse(sessionStorage.getItem("splayuiTabInfo"));
if (layuiminiTabInfo == null) { if (splayuiTabInfo == null) {
layuiminiTabInfo = {}; splayuiTabInfo = {};
} }
var check = layuiminiTabInfo[tabId]; var check = splayuiTabInfo[tabId];
if (check == undefined || check == null) { if (check == undefined || check == null) {
return false; return false;
} }
@ -453,14 +453,14 @@ layui.define(["element", "jquery"], function (exports) {
*/ */
this.addTab = function (tabId, href, title, addSession) { this.addTab = function (tabId, href, title, addSession) {
if (addSession == undefined || addSession == true) { if (addSession == undefined || addSession == true) {
var layuiminiTabInfo = JSON.parse(sessionStorage.getItem("layuiminiTabInfo")); var splayuiTabInfo = JSON.parse(sessionStorage.getItem("splayuiTabInfo"));
if (layuiminiTabInfo == null) { if (splayuiTabInfo == null) {
layuiminiTabInfo = {}; splayuiTabInfo = {};
} }
layuiminiTabInfo[tabId] = {href: href, title: title} splayuiTabInfo[tabId] = {href: href, title: title}
sessionStorage.setItem("layuiminiTabInfo", JSON.stringify(layuiminiTabInfo)); sessionStorage.setItem("splayuiTabInfo", JSON.stringify(splayuiTabInfo));
} }
element.tabAdd('layuiminiTab', { element.tabAdd('splayuiTab', {
title: title + '<i data-tab-close="" class="layui-icon layui-unselect layui-tab-close">ဆ</i>' //用于演示 title: title + '<i data-tab-close="" class="layui-icon layui-unselect layui-tab-close">ဆ</i>' //用于演示
, content: '<iframe width="100%" height="100%" frameborder="0" src="' + href + '"></iframe>' , content: '<iframe width="100%" height="100%" frameborder="0" src="' + href + '"></iframe>'
, id: tabId , id: tabId
@ -472,19 +472,19 @@ layui.define(["element", "jquery"], function (exports) {
* @param tabId * @param tabId
*/ */
this.delTab = function (tabId) { this.delTab = function (tabId) {
var layuiminiTabInfo = JSON.parse(sessionStorage.getItem("layuiminiTabInfo")); var splayuiTabInfo = JSON.parse(sessionStorage.getItem("splayuiTabInfo"));
if (layuiminiTabInfo) { if (splayuiTabInfo) {
delete layuiminiTabInfo[tabId]; delete splayuiTabInfo[tabId];
sessionStorage.setItem("layuiminiTabInfo", JSON.stringify(layuiminiTabInfo)) sessionStorage.setItem("splayuiTabInfo", JSON.stringify(splayuiTabInfo))
} }
element.tabDelete('layuiminiTab', tabId); element.tabDelete('splayuiTab', tabId);
}; };
/** /**
* 切换选项卡 * 切换选项卡
**/ **/
this.changeTab = function (tabId) { this.changeTab = function (tabId) {
element.tabChange('layuiminiTab', tabId); element.tabChange('splayuiTab', tabId);
}; };
/** /**
@ -492,8 +492,8 @@ layui.define(["element", "jquery"], function (exports) {
*/ */
this.hashTab = function () { this.hashTab = function () {
var layId = location.hash.replace(/^#/, ''); var layId = location.hash.replace(/^#/, '');
element.tabChange('layuiminiTab', layId); element.tabChange('splayuiTab', layId);
element.on('tab(layuiminiTab)', function (elem) { element.on('tab(splayuiTab)', function (elem) {
location.hash = $(this).attr('lay-id'); location.hash = $(this).attr('lay-id');
}); });
}; };
@ -522,7 +522,7 @@ layui.define(["element", "jquery"], function (exports) {
* @returns {boolean} * @returns {boolean}
*/ */
this.checkUrl = function (url) { this.checkUrl = function (url) {
if (!layuimini.config('checkUrlDefault')) { if (!splayui.config('checkUrlDefault')) {
return true; return true;
} }
var msg = true; var msg = true;
@ -661,9 +661,9 @@ layui.define(["element", "jquery"], function (exports) {
$parent = $(this).parent(); $parent = $(this).parent();
tabId = $parent.attr('lay-id'); tabId = $parent.attr('lay-id');
if (tabId != undefined || tabId != null) { if (tabId != undefined || tabId != null) {
layuimini.delTab(tabId); splayui.delTab(tabId);
} }
layuimini.tabRoll(); splayui.tabRoll();
layer.close(loading); layer.close(loading);
}); });
@ -684,7 +684,7 @@ layui.define(["element", "jquery"], function (exports) {
title = title.replace('style="display: none;"', ''); title = title.replace('style="display: none;"', '');
// 拼接参数 // 拼接参数
if (layuimini.config('urlSuffixDefault')) { if (splayui.config('urlSuffixDefault')) {
var menuParameId = $(this).attr('data-tab-mpi'); var menuParameId = $(this).attr('data-tab-mpi');
if (href.indexOf("?") > -1) { if (href.indexOf("?") > -1) {
href = href + '&mpi=' + menuParameId; href = href + '&mpi=' + menuParameId;
@ -696,22 +696,22 @@ layui.define(["element", "jquery"], function (exports) {
} }
// 判断链接是否有效 // 判断链接是否有效
var checkUrl = layuimini.checkUrl(href); var checkUrl = splayui.checkUrl(href);
if (checkUrl != true) { if (checkUrl != true) {
return layuimini.msg_error(checkUrl); return splayui.msg_error(checkUrl);
} }
if (tabId == null || tabId == undefined) { if (tabId == null || tabId == undefined) {
tabId = new Date().getTime(); tabId = new Date().getTime();
} }
// 判断该窗口是否已经打开过 // 判断该窗口是否已经打开过
var checkTab = layuimini.checkTab(tabId); var checkTab = splayui.checkTab(tabId);
if (!checkTab) { if (!checkTab) {
layuimini.addTab(tabId, href, title, true); splayui.addTab(tabId, href, title, true);
} }
element.tabChange('layuiminiTab', tabId); element.tabChange('splayuiTab', tabId);
layuimini.initDevice(); splayui.initDevice();
layuimini.tabRoll(); splayui.tabRoll();
layer.close(loading); layer.close(loading);
}); });
@ -735,22 +735,22 @@ layui.define(["element", "jquery"], function (exports) {
tabId = new Date().getTime(); tabId = new Date().getTime();
} }
// 判断该窗口是否已经打开过 // 判断该窗口是否已经打开过
var checkTab = layuimini.checkTab(tabId, true); var checkTab = splayui.checkTab(tabId, true);
if (!checkTab) { if (!checkTab) {
var layuiminiTabInfo = JSON.parse(sessionStorage.getItem("layuiminiTabInfo")); var splayuiTabInfo = JSON.parse(sessionStorage.getItem("splayuiTabInfo"));
if (layuiminiTabInfo == null) { if (splayuiTabInfo == null) {
layuiminiTabInfo = {}; splayuiTabInfo = {};
} }
layuiminiTabInfo[tabId] = {href: href, title: title} splayuiTabInfo[tabId] = {href: href, title: title}
sessionStorage.setItem("layuiminiTabInfo", JSON.stringify(layuiminiTabInfo)); sessionStorage.setItem("splayuiTabInfo", JSON.stringify(splayuiTabInfo));
parent.layui.element.tabAdd('layuiminiTab', { parent.layui.element.tabAdd('splayuiTab', {
title: title + '<i data-tab-close="" class="layui-icon layui-unselect layui-tab-close">ဆ</i>' //用于演示 title: title + '<i data-tab-close="" class="layui-icon layui-unselect layui-tab-close">ဆ</i>' //用于演示
, content: '<iframe width="100%" height="100%" frameborder="0" src="' + href + '"></iframe>' , content: '<iframe width="100%" height="100%" frameborder="0" src="' + href + '"></iframe>'
, id: tabId , id: tabId
}); });
} }
parent.layui.element.tabChange('layuiminiTab', tabId); parent.layui.element.tabChange('splayuiTab', tabId);
layuimini.tabRoll(); splayui.tabRoll();
parent.layer.close(loading); parent.layer.close(loading);
}); });
@ -785,17 +785,17 @@ layui.define(["element", "jquery"], function (exports) {
$.getJSON(clearUrl, function (data, status) { $.getJSON(clearUrl, function (data, status) {
layer.close(loading); layer.close(loading);
if (data.code != 1) { if (data.code != 1) {
return layuimini.msg_error(data.msg); return splayui.msg_error(data.msg);
} else { } else {
return layuimini.msg_success(data.msg); return splayui.msg_success(data.msg);
} }
}).fail(function () { }).fail(function () {
layer.close(loading); layer.close(loading);
return layuimini.msg_error('清理缓存接口有误'); return splayui.msg_error('清理缓存接口有误');
}); });
} else { } else {
layer.close(loading); layer.close(loading);
return layuimini.msg_success('清除缓存成功'); return splayui.msg_success('清除缓存成功');
} }
}); });
@ -804,7 +804,7 @@ layui.define(["element", "jquery"], function (exports) {
*/ */
$('body').on('click', '[data-refresh]', function () { $('body').on('click', '[data-refresh]', function () {
$(".layui-tab-item.layui-show").find("iframe")[0].contentWindow.location.reload(); $(".layui-tab-item.layui-show").find("iframe")[0].contentWindow.location.reload();
layuimini.msg_success('刷新成功'); splayui.msg_success('刷新成功');
}); });
/** /**
@ -816,18 +816,18 @@ layui.define(["element", "jquery"], function (exports) {
$(".layui-tab-title li").each(function () { $(".layui-tab-title li").each(function () {
tabId = $(this).attr('lay-id'); tabId = $(this).attr('lay-id');
var id = $(this).attr('id'); var id = $(this).attr('id');
if (id != 'layuiminiHomeTabId') { if (id != 'splayuiHomeTabId') {
var tabClass = $(this).attr('class'); var tabClass = $(this).attr('class');
if (closeType == 'all') { if (closeType == 'all') {
layuimini.delTab(tabId); splayui.delTab(tabId);
} else { } else {
if (tabClass != 'layui-this') { if (tabClass != 'layui-this') {
layuimini.delTab(tabId); splayui.delTab(tabId);
} }
} }
} }
}); });
layuimini.tabRoll(); splayui.tabRoll();
layer.close(loading); layer.close(loading);
}); });
@ -839,14 +839,14 @@ layui.define(["element", "jquery"], function (exports) {
var isShow = $(this).attr('data-side-fold'); var isShow = $(this).attr('data-side-fold');
if (isShow == 1) { // 缩放 if (isShow == 1) { // 缩放
$(this).attr('data-side-fold', 0); $(this).attr('data-side-fold', 0);
$('.layuimini-tool i').attr('class', 'fa fa-indent'); $('.splayui-tool i').attr('class', 'fa fa-indent');
$('.layui-layout-body').attr('class', 'layui-layout-body layuimini-mini'); $('.layui-layout-body').attr('class', 'layui-layout-body splayui-mini');
} else { // 正常 } else { // 正常
$(this).attr('data-side-fold', 1); $(this).attr('data-side-fold', 1);
$('.layuimini-tool i').attr('class', 'fa fa-outdent'); $('.splayui-tool i').attr('class', 'fa fa-outdent');
$('.layui-layout-body').attr('class', 'layui-layout-body layuimini-all'); $('.layui-layout-body').attr('class', 'layui-layout-body splayui-all');
} }
layuimini.tabRoll(); splayui.tabRoll();
element.init(); element.init();
layer.close(loading); layer.close(loading);
}); });
@ -857,13 +857,13 @@ layui.define(["element", "jquery"], function (exports) {
$("body").on("mouseenter", ".layui-menu-tips", function () { $("body").on("mouseenter", ".layui-menu-tips", function () {
var classInfo = $(this).attr('class'), var classInfo = $(this).attr('class'),
tips = $(this).children('span').text(), tips = $(this).children('span').text(),
isShow = $('.layuimini-tool i').attr('data-side-fold'); isShow = $('.splayui-tool i').attr('data-side-fold');
if (isShow == 0) { if (isShow == 0) {
openTips = layer.tips(tips, $(this), {tips: [2, '#2f4056'], time: 30000}); openTips = layer.tips(tips, $(this), {tips: [2, '#2f4056'], time: 30000});
} }
}); });
$("body").on("mouseleave", ".layui-menu-tips", function () { $("body").on("mouseleave", ".layui-menu-tips", function () {
var isShow = $('.layuimini-tool i').attr('data-side-fold'); var isShow = $('.splayui-tool i').attr('data-side-fold');
if (isShow == 0) { if (isShow == 0) {
try { try {
layer.close(openTips); layer.close(openTips);
@ -879,8 +879,8 @@ layui.define(["element", "jquery"], function (exports) {
$('body').on('click', '[data-bgcolor]', function () { $('body').on('click', '[data-bgcolor]', function () {
var loading = layer.load(0, {shade: false, time: 2 * 1000}); var loading = layer.load(0, {shade: false, time: 2 * 1000});
var clientHeight = (document.documentElement.clientHeight) - 95; var clientHeight = (document.documentElement.clientHeight) - 95;
var bgColorHtml = layuimini.buildBgColorHtml(); var bgColorHtml = splayui.buildBgColorHtml();
var html = '<div class="layuimini-color">\n' + var html = '<div class="splayui-color">\n' +
'<div class="color-title">\n' + '<div class="color-title">\n' +
'<span>配色方案</span>\n' + '<span>配色方案</span>\n' +
'</div>\n' + '</div>\n' +
@ -895,12 +895,12 @@ layui.define(["element", "jquery"], function (exports) {
shade: 0.2, shade: 0.2,
anim: 2, anim: 2,
shadeClose: true, shadeClose: true,
id: 'layuiminiBgColor', id: 'splayuiBgColor',
area: ['340px', clientHeight + 'px'], area: ['340px', clientHeight + 'px'],
offset: 'rb', offset: 'rb',
content: html, content: html,
end: function () { end: function () {
$('.layuimini-select-bgcolor').removeClass('layui-this'); $('.splayui-select-bgcolor').removeClass('layui-this');
} }
}); });
layer.close(loading); layer.close(loading);
@ -911,11 +911,11 @@ layui.define(["element", "jquery"], function (exports) {
*/ */
$('body').on('click', '[data-select-bgcolor]', function () { $('body').on('click', '[data-select-bgcolor]', function () {
var bgcolorId = $(this).attr('data-select-bgcolor'); var bgcolorId = $(this).attr('data-select-bgcolor');
$('.layuimini-color .color-content ul .layui-this').attr('class', ''); $('.splayui-color .color-content ul .layui-this').attr('class', '');
$(this).attr('class', 'layui-this'); $(this).attr('class', 'layui-this');
sessionStorage.setItem('layuiminiBgcolorId', bgcolorId); sessionStorage.setItem('splayuiBgcolorId', bgcolorId);
layuimini.initBgColor(); splayui.initBgColor();
}); });
exports("layuimini", layuimini); exports("splayui", splayui);
}); });

View File

@ -11,18 +11,18 @@
<meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no"> <meta name="format-detection" content="telephone=no">
<#include "${request.contextPath}/common/common.ftl"> <#include "${request.contextPath}/common/common.ftl">
<link rel="stylesheet" href="${request.contextPath}/css/layuimini.css" media="all"> <link rel="stylesheet" href="${request.contextPath}/css/splayui.css" media="all">
<style id="layuimini-bg-color"> <style id="splayui-bg-color">
</style> </style>
</head> </head>
<body class="layui-layout-body layuimini-all"> <body class="layui-layout-body splayui-all">
<div class="layui-layout layui-layout-admin"> <div class="layui-layout layui-layout-admin">
<div class="layui-header header"> <div class="layui-header header">
<div class="layui-logo"> <div class="layui-logo">
</div> </div>
<a> <a>
<div class="layuimini-tool"><i title="展开" class="fa fa-outdent" data-side-fold="1"></i></div> <div class="splayui-tool"><i title="展开" class="fa fa-outdent" data-side-fold="1"></i></div>
</a> </a>
<ul class="layui-nav layui-layout-left layui-header-menu layui-header-pc-menu mobile layui-hide-xs"> <ul class="layui-nav layui-layout-left layui-header-menu layui-header-pc-menu mobile layui-hide-xs">
@ -40,9 +40,9 @@
<a href="javascript:;" data-refresh="刷新"><i class="fa fa-refresh"></i></a> <a href="javascript:;" data-refresh="刷新"><i class="fa fa-refresh"></i></a>
</li> </li>
<li class="layui-nav-item"> <li class="layui-nav-item">
<a href="javascript:;" data-clear="清理" class="layuimini-clear"><i class="fa fa-trash-o"></i></a> <a href="javascript:;" data-clear="清理" class="splayui-clear"><i class="fa fa-trash-o"></i></a>
</li> </li>
<li class="layui-nav-item layuimini-setting"> <li class="layui-nav-item splayui-setting">
<a href="javascript:;">admin</a> <a href="javascript:;">admin</a>
<dl class="layui-nav-child"> <dl class="layui-nav-child">
<dd> <dd>
@ -56,7 +56,7 @@
</dd> </dd>
</dl> </dl>
</li> </li>
<li class="layui-nav-item layuimini-select-bgcolor mobile layui-hide-xs"> <li class="layui-nav-item splayui-select-bgcolor mobile layui-hide-xs">
<a href="javascript:;" data-bgcolor="配色方案"><i class="fa fa-ellipsis-v"></i></a> <a href="javascript:;" data-bgcolor="配色方案"><i class="fa fa-ellipsis-v"></i></a>
</li> </li>
</ul> </ul>
@ -68,9 +68,9 @@
</div> </div>
<div class="layui-body"> <div class="layui-body">
<div class="layui-tab" lay-filter="layuiminiTab" id="top_tabs_box"> <div class="layui-tab" lay-filter="splayuiTab" id="top_tabs_box">
<ul class="layui-tab-title" id="top_tabs"> <ul class="layui-tab-title" id="top_tabs">
<li class="layui-this" id="layuiminiHomeTabId" lay-id=""></li> <li class="layui-this" id="splayuiHomeTabId" lay-id=""></li>
</ul> </ul>
<ul class="layui-nav closeBox"> <ul class="layui-nav closeBox">
<li class="layui-nav-item"> <li class="layui-nav-item">
@ -82,19 +82,19 @@
</li> </li>
</ul> </ul>
<div class="layui-tab-content clildFrame"> <div class="layui-tab-content clildFrame">
<div id="layuiminiHomeTabIframe" class="layui-tab-item layui-show"> <div id="splayuiHomeTabIframe" class="layui-tab-item layui-show">
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<script> <script>
layui.use(['element', 'layer', 'layuimini'], function () { layui.use(['element', 'layer', 'splayui'], function () {
var element = layui.element, var element = layui.element,
layer = layui.layer, layer = layui.layer,
layuimini = layui.layuimini; splayui = layui.splayui;
layuimini.init('${request.contextPath}/admin/list/index/menu/tree'); splayui.init('${request.contextPath}/admin/list/index/menu/tree');
}); });
</script> </script>
</body> </body>

View File

@ -10,9 +10,9 @@
</head> </head>
<body> <body>
<div class="layuimini-container"> <div class="splayui-container">
<div class="layuimini-main"> <div class="splayui-main">
<form class="layui-form layuimini-form"> <form class="layui-form splayui-form">
<div class="layui-row"> <div class="layui-row">
<div class="layui-col-xs6 layui-col-sm6 layui-col-md6"> <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
<div class="layui-form-item"> <div class="layui-form-item">

View File

@ -17,8 +17,8 @@
</style> </style>
</head> </head>
<body> <body>
<div class="layuimini-container"> <div class="splayui-container">
<div class="layuimini-main"> <div class="splayui-main">
<div> <div>
<div class="layui-btn-group"> <div class="layui-btn-group">
<button class="layui-btn" id="js-expand-fold-all">全部展开/折叠</button> <button class="layui-btn" id="js-expand-fold-all">全部展开/折叠</button>

View File

@ -9,9 +9,9 @@
<#include "${request.contextPath}/common/common.ftl"> <#include "${request.contextPath}/common/common.ftl">
</head> </head>
<body> <body>
<div class="layuimini-container"> <div class="splayui-container">
<div class="layuimini-main"> <div class="splayui-main">
<form class="layui-form layuimini-form"> <form class="layui-form splayui-form">
<div class="layui-row"> <div class="layui-row">
<div class="layui-col-xs6 layui-col-sm6 layui-col-md6"> <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
<div class="layui-form-item"> <div class="layui-form-item">

View File

@ -10,8 +10,8 @@
<#include "${request.contextPath}/common/common.ftl"> <#include "${request.contextPath}/common/common.ftl">
</head> </head>
<body> <body>
<div class="layuimini-container"> <div class="splayui-container">
<div class="layuimini-main"> <div class="splayui-main">
<!--查询参数--> <!--查询参数-->
<form id="js-search-form" class="layui-form" lay-filter="js-q-form-filter"> <form id="js-search-form" class="layui-form" lay-filter="js-q-form-filter">
<div class="layui-form-item"> <div class="layui-form-item">

View File

@ -6,8 +6,8 @@
<#include "${request.contextPath}/common/common.ftl"> <#include "${request.contextPath}/common/common.ftl">
</head> </head>
<body> <body>
<div class="layuimini-container"> <div class="splayui-container">
<div class="layuimini-main"> <div class="splayui-main">
<blockquote class="layui-elem-quote"> <blockquote class="layui-elem-quote">
颜色选择器使用开源项目paigusu<br> 颜色选择器使用开源项目paigusu<br>

View File

@ -9,8 +9,8 @@
<#include "${request.contextPath}/common/common.ftl"> <#include "${request.contextPath}/common/common.ftl">
</head> </head>
<body> <body>
<div class="layuimini-container"> <div class="splayui-container">
<div class="layuimini-main"> <div class="splayui-main">
<blockquote class="layui-elem-quote"> <blockquote class="layui-elem-quote">
富文本编辑器使用开源项目wangEditor<br> 富文本编辑器使用开源项目wangEditor<br>

View File

@ -6,8 +6,8 @@
<#include "${request.contextPath}/common/common.ftl"> <#include "${request.contextPath}/common/common.ftl">
</head> </head>
<body> <body>
<div class="layuimini-container"> <div class="splayui-container">
<div class="layuimini-main"> <div class="splayui-main">
<div class="layui-fluid"> <div class="layui-fluid">
<div class="layui-card"> <div class="layui-card">
<div class="layui-card-body" style="padding-top: 40px;"> <div class="layui-card-body" style="padding-top: 40px;">

View File

@ -24,8 +24,8 @@
</style> </style>
</head> </head>
<body> <body>
<div class="layuimini-container"> <div class="splayui-container">
<div class="layuimini-main"> <div class="splayui-main">
<div class="section"> <div class="section">
<h4><span>全部图标</span></h4> <h4><span>全部图标</span></h4>
<hr> <hr>

View File

@ -9,8 +9,8 @@
</style> </style>
</head> </head>
<body> <body>
<div class="layuimini-container"> <div class="splayui-container">
<div class="layuimini-main"> <div class="splayui-main">
<blockquote class="layui-elem-quote"> <blockquote class="layui-elem-quote">
fa图标选择器根据开源Layui-IconPicker插件修改而来。<br> fa图标选择器根据开源Layui-IconPicker插件修改而来。<br>

View File

@ -10,9 +10,9 @@
</head> </head>
<body> <body>
<div class="layuimini-container"> <div class="splayui-container">
<div class="layuimini-main"> <div class="splayui-main">
<form class="layui-form layuimini-form"> <form class="layui-form splayui-form">
<div class="layui-row"> <div class="layui-row">
<div class="layui-col-xs6 layui-col-sm6 layui-col-md6"> <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
<div class="layui-form-item"> <div class="layui-form-item">

View File

@ -9,8 +9,8 @@
<#include "${request.contextPath}/common/common.ftl"> <#include "${request.contextPath}/common/common.ftl">
</head> </head>
<body> <body>
<div class="layuimini-container"> <div class="splayui-container">
<div class="layuimini-main"> <div class="splayui-main">
<!--查询参数--> <!--查询参数-->
<form id="js-search-form" class="layui-form" lay-filter="js-q-form-filter"> <form id="js-search-form" class="layui-form" lay-filter="js-q-form-filter">
<div class="layui-form-item"> <div class="layui-form-item">

View File

@ -12,8 +12,8 @@
<#include "${request.contextPath}/common/common.ftl"> <#include "${request.contextPath}/common/common.ftl">
</head> </head>
<body> <body>
<div class="layuimini-container"> <div class="splayui-container">
<div class="layuimini-main"> <div class="splayui-main">
<ul class="layui-timeline"> <ul class="layui-timeline">
<li class="layui-timeline-item"> <li class="layui-timeline-item">
<i class="layui-icon layui-timeline-axis">&#xe63f;</i> <i class="layui-icon layui-timeline-axis">&#xe63f;</i>