mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-01 15:32:48 +08:00
feat: 优化返回的tab定位
This commit is contained in:
@@ -44,6 +44,9 @@
|
||||
|
||||
<div class="hr-line"></div>
|
||||
<div class="layui-form-item text-center">
|
||||
{notempty name='$Request.param.backTagId'}
|
||||
<div class="layui-btn layui-btn-sm page-back-button" layuimini-content-href="{$Request.param.backTagId}" data-back="1">返回</div>
|
||||
{/notempty}
|
||||
<button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit>确认</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">重置</button>
|
||||
</div>
|
||||
|
||||
@@ -303,11 +303,12 @@
|
||||
maxTabNum: options.maxTabNum,
|
||||
});
|
||||
}
|
||||
parent.layui.element.tabChange('layuiminiTab', tabId);
|
||||
parent.layer.close(loading);
|
||||
if (back == 1) {
|
||||
console.log(back);
|
||||
|
||||
|
||||
parent.layer.close(loading);
|
||||
// TODO:优化父元素操作兼容性
|
||||
parent.layui.element.tabChange('layuiminiTab', tabId);
|
||||
if (back == 1) {
|
||||
miniTab.delete(ua.getCurrentPageId());
|
||||
}
|
||||
});
|
||||
|
||||
@@ -2279,22 +2279,23 @@
|
||||
if (backWindow) {
|
||||
backWindow.layui.table.reloadData(option.refreshTable);
|
||||
} else {
|
||||
admin.findIndexPage(function (window) {
|
||||
var menu = window.miniTab.searchMenu(option.backHref);
|
||||
admin.findIndexPage(function (w) {
|
||||
var menu = w.miniTab.searchMenu(option.backHref);
|
||||
var title = option.backHref
|
||||
|
||||
if(menu){
|
||||
title = menu.title;
|
||||
}
|
||||
window.miniTab.create({
|
||||
w.miniTab.create({
|
||||
tabId: option.backHref,
|
||||
href: option.backHref,
|
||||
title: title,
|
||||
});
|
||||
});
|
||||
}
|
||||
admin.findIndexPage(function (window) {
|
||||
window.layui.element.tabDelete('layuiminiTab', admin.getCurrentPageId());
|
||||
admin.findIndexPage(function (w) {
|
||||
w.layui.element.tabDelete('layuiminiTab', admin.getCurrentPageId());
|
||||
w.layui.element.tabChange('layuiminiTab', option.backHref);
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user