feat: 优化返回效果;

This commit is contained in:
augushong
2025-08-21 22:56:19 +08:00
parent 5eb4d787c7
commit 9493134c56
2 changed files with 28 additions and 14 deletions

View File

@@ -3,6 +3,9 @@
{{formList}} {{formList}}
<div class="hr-line"></div> <div class="hr-line"></div>
<div class="layui-form-item text-center"> <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="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> <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">重置</button>
</div> </div>

View File

@@ -185,7 +185,7 @@
*/ */
searchMenu: function (href, menuList) { searchMenu: function (href, menuList) {
if (!menuList) { if (!menuList) {
menuList = this.renderOptions.menuList menuList = this.renderOptions.menuList;
} }
var menu; var menu;
@@ -264,6 +264,7 @@
external = $(this).attr('data-external') || false, external = $(this).attr('data-external') || false,
target = $(this).attr('target'); target = $(this).attr('target');
if (back == 0) { if (back == 0) {
if (href.indexOf("?") === -1) { if (href.indexOf("?") === -1) {
href += '?backTagId=' + ua.getCurrentPageId(); href += '?backTagId=' + ua.getCurrentPageId();
@@ -284,6 +285,16 @@
var checkTab = miniTab.check(tabId, true); var checkTab = miniTab.check(tabId, true);
if (!checkTab) { if (!checkTab) {
if (!title) {
title = tabId;
ua.findIndexPage(function (window) {
var menu = window.miniTab.searchMenu(tabId);
if (menu) {
title = menu.title;
}
});
}
miniTab.create({ miniTab.create({
tabId: tabId, tabId: tabId,
href: href, href: href,