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; };