优化刷新机制。新的界面不存在长链接地址显示
parent
7c1f0d360b
commit
dd1f761cbc
|
@ -137,12 +137,9 @@ layui.define(["element", "jquery"], function (exports) {
|
||||||
leftMenuHtml += '<ul class="layui-nav layui-nav-tree layui-left-nav-tree ' + leftMenuCheckDefault + '" id="' + key + '">\n';
|
leftMenuHtml += '<ul class="layui-nav layui-nav-tree layui-left-nav-tree ' + leftMenuCheckDefault + '" id="' + key + '">\n';
|
||||||
var menuList = val.children;
|
var menuList = val.children;
|
||||||
$.each(menuList, function (index, menu) {
|
$.each(menuList, function (index, menu) {
|
||||||
if (booleanNav)
|
if (booleanNav) {
|
||||||
{
|
|
||||||
leftMenuHtml += '<li class="layui-nav-item layui-nav-itemed">\n';
|
leftMenuHtml += '<li class="layui-nav-item layui-nav-itemed">\n';
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
leftMenuHtml += '<li class="layui-nav-item ">\n';
|
leftMenuHtml += '<li class="layui-nav-item ">\n';
|
||||||
}
|
}
|
||||||
if (menu.children && menu.children.length > 0) {
|
if (menu.children && menu.children.length > 0) {
|
||||||
|
@ -264,6 +261,8 @@ layui.define(["element", "jquery"], function (exports) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (splayuiHomeTab != href && splayuiHomeHref != href) {
|
if (splayuiHomeTab != href && splayuiHomeHref != href) {
|
||||||
|
var decodeLocationHref = decodeURI(href, "utf-8").split("mpi=");
|
||||||
|
title = "<i style=\"width: 14px;\" class=\"fa fa-microchip\"></i><span class=\"layui-left-nav\">" + decodeLocationHref.pop() + "</span>"
|
||||||
spLayui.addTab(tabId, href, title, true);
|
spLayui.addTab(tabId, href, title, true);
|
||||||
spLayui.changeTab(tabId);
|
spLayui.changeTab(tabId);
|
||||||
}
|
}
|
||||||
|
@ -465,6 +464,7 @@ layui.define(["element", "jquery"], function (exports) {
|
||||||
splayuiTabInfo[tabId] = {href: href, title: title}
|
splayuiTabInfo[tabId] = {href: href, title: title}
|
||||||
sessionStorage.setItem("splayuiTabInfo", JSON.stringify(splayuiTabInfo));
|
sessionStorage.setItem("splayuiTabInfo", JSON.stringify(splayuiTabInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
element.tabAdd('splayuiTab', {
|
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>'
|
||||||
|
@ -687,7 +687,6 @@ layui.define(["element", "jquery"], function (exports) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
title = title.replace('style="display: none;"', '');
|
title = title.replace('style="display: none;"', '');
|
||||||
|
|
||||||
// 拼接参数
|
// 拼接参数
|
||||||
if (spLayui.config('urlSuffixDefault')) {
|
if (spLayui.config('urlSuffixDefault')) {
|
||||||
var menuParameId = $(this).attr('data-tab-mpi');
|
var menuParameId = $(this).attr('data-tab-mpi');
|
||||||
|
@ -699,7 +698,6 @@ layui.define(["element", "jquery"], function (exports) {
|
||||||
tabId = href;
|
tabId = href;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 判断链接是否有效
|
// 判断链接是否有效
|
||||||
var checkUrl = spLayui.checkUrl(href);
|
var checkUrl = spLayui.checkUrl(href);
|
||||||
if (checkUrl != true) {
|
if (checkUrl != true) {
|
||||||
|
|
Loading…
Reference in New Issue