diff --git a/public/assets/js/require-backend.min.js b/public/assets/js/require-backend.min.js index 459b302..e2a3853 100644 --- a/public/assets/js/require-backend.min.js +++ b/public/assets/js/require-backend.min.js @@ -2086,12 +2086,16 @@ define('backend',['jquery', 'bootstrap', 'toastr', 'layer', 'lang', 'config'], f var btnHeight = layero.find('.layui-layer-btn').outerHeight() || 0; var oldheg = heg + titHeight + btnHeight; + var maxheg = 600; + if (frame.outerWidth() < 768) { + maxheg = $(window).height() - 28; + } // 如果有.layer-footer或窗口小于600则重新排 - if (layerfooter.size() > 0 || oldheg < 600) { + if (layerfooter.size() > 0 || oldheg < maxheg) { var footerHeight = layero.find('.layui-layer-footer').outerHeight() || 0; footerHeight = 0; - if (oldheg >= 600) { - heg = Math.min(600, oldheg) - titHeight - btnHeight - footerHeight; + if (oldheg >= maxheg) { + heg = Math.min(maxheg, oldheg) - titHeight - btnHeight - footerHeight; } layero.css({height: heg + titHeight + btnHeight + footerHeight}); layero.find("iframe").css({height: heg}); @@ -7206,6 +7210,7 @@ define('table',['jquery', 'bootstrap', 'backend', 'config', 'toastr', 'moment', paginationNextText: __("Next"), paginationLastText: __("Last"), mobileResponsive: true, + cardView: true, checkOnInit: true, extend: { index_url: '', @@ -7409,9 +7414,17 @@ define('table',['jquery', 'bootstrap', 'backend', 'config', 'toastr', 'moment', }, 'click .btn-delone': function (e, value, row, index) { var that = this; + var top = $(that).offset().top - $(window).scrollTop(); + var left = $(that).offset().left - $(window).scrollLeft() - 260; + if (top + 154 > $(window).height()) { + top = top - 154; + } + if ($(window).width() < 480) { + top = left = undefined; + } var index = Backend.api.layer.confirm( __('Are you sure you want to delete this item?'), - {icon: 3, title: __('Warning'), offset: [$(that).offset().top, $(that).offset().left - 260], shadeClose: true}, + {icon: 3, title: __('Warning'), offset: [top, left], shadeClose: true}, function () { var table = $(that).closest('table'); Table.api.multi("del", row.id, table, that);