From 17a024de12ed1b67c38e5d5519232a31c038d70a Mon Sep 17 00:00:00 2001 From: augushong Date: Wed, 12 Nov 2025 18:29:09 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A1=B5=E9=9D=A2=E4=BB=A5=E5=AD=90?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=89=93=E5=8D=A1=E6=97=B6=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E5=BC=B9=E6=A1=86=E6=96=B9=E5=BC=8F=E5=A2=9E=E5=8A=A0=E5=92=8C?= =?UTF-8?q?=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/plugs/ulthon-admin/ulthon-admin.js | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/public/static/plugs/ulthon-admin/ulthon-admin.js b/public/static/plugs/ulthon-admin/ulthon-admin.js index 13a7eca..b71bbff 100644 --- a/public/static/plugs/ulthon-admin/ulthon-admin.js +++ b/public/static/plugs/ulthon-admin/ulthon-admin.js @@ -388,15 +388,13 @@ admin.api.copyText('[lay-id=' + options.id + ']'); }; - + /** + * 为空时认为自己是普通状态,否则是单选、多选、子页面,此时添加等默认行为走弹框而不是新标签页 + */ selectMode = admin.getQueryVariable("select_mode"); selectConfirmCallback = admin.getQueryVariable('select_confirm_callback', 'onTableDataConfirm'); - - - - if (selectMode == 'checkbox') { if (options.cols[0][0].type == 'radio') { options.cols[0][0].type = 'checkbox'; @@ -415,8 +413,13 @@ }); } + } else { + if(!admin.isParentIndex()){ + selectMode = 'childPage' + } } + // 判断元素对象是否有嵌套的 options.cols = admin.table.formatCols(options.cols, options.init); @@ -3147,6 +3150,16 @@ } return false; }, + isParentIndex(){ + try { + if (window.parent && window.parent.pageType && window.parent.pageType == 'index') { + return true; + } + } catch (e) { + return false; + } + return false; + }, findIndexPage(findCallback, missCallback) { if (!findCallback) { findCallback = function (w) { return w; };