...
|
...
|
@@ -134,11 +134,35 @@ layui.extend({ |
|
|
|
|
|
}
|
|
|
});
|
|
|
var tabName;
|
|
|
//start lsq 页面刷新后名称改变,把aj得存储到localStorage中 2022-04-18
|
|
|
let routerPath=router.path;
|
|
|
if(routerPath.indexOf('ajConfig')!=-1 && routerPath.indexOf('view')!=-1 && !localStorage.getItem(router.search.ajConfig)){
|
|
|
localStorage.setItem(router.search.ajConfig,admin.tabsPage.elem.text());
|
|
|
}
|
|
|
try {
|
|
|
let el = admin.tabsPage.elem;
|
|
|
if(el && el.attr('lay-href-type')){
|
|
|
if(el.attr('lay-href-type') == 'menu' && !matchTo){
|
|
|
tabName= admin.tabsPage.elem.text();
|
|
|
}
|
|
|
}
|
|
|
} catch (e){
|
|
|
}
|
|
|
if(!tabName){
|
|
|
|
|
|
if(routerPath.indexOf('ajConfig')!=-1 && routerPath.indexOf('view')!=-1){
|
|
|
tabName=localStorage.getItem(router.search.ajConfig);
|
|
|
}else{
|
|
|
tabName= res.title
|
|
|
|
|
|
}
|
|
|
}
|
|
|
//end lsq 页面刷新后名称改变 2022-04-18
|
|
|
//如果未在选项卡中匹配到,则追加选项卡
|
|
|
if(setter.pageTabs && pathURL !== '/'){
|
|
|
if(!matchTo){
|
|
|
var tabName='' // tab标签名
|
|
|
/*var tabName='' // tab标签名
|
|
|
var url=pathURL.substring(1)
|
|
|
tabList.forEach((e) =>{
|
|
|
if(url === e.path){
|
...
|
...
|
@@ -147,7 +171,7 @@ layui.extend({ |
|
|
});
|
|
|
if(!tabName){
|
|
|
tabName= res.title
|
|
|
}
|
|
|
}*/
|
|
|
$(APP_BODY).append('<div class="layadmin-tabsbody-item layui-show"></div>');
|
|
|
tabsPage.index = tabs.length;
|
|
|
element.tabAdd(FILTER_TAB_TBAS, {
|
...
|
...
|
@@ -164,7 +188,9 @@ layui.extend({ |
|
|
|
|
|
//定位当前tabs
|
|
|
element.tabChange(FILTER_TAB_TBAS, pathURL);
|
|
|
admin.tabsBodyChange(tabsPage.index);
|
|
|
// 修改为当前菜单名称 lsq 2022-04-18
|
|
|
$('* [lay-id="' + pathURL + '"] span').text(tabName)
|
|
|
admin.tabsBodyChange(tabsPage.index);
|
|
|
|
|
|
}).done(function(){
|
|
|
layui.use('common', layui.cache.callback.common);
|
...
|
...
|
|