From e182a459a58f139283a073037f1beb6392324e1e Mon Sep 17 00:00:00 2001 From: zhang <870110809@qq.com> Date: Mon, 26 Nov 2018 11:42:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=93=8D=E4=BD=9C=E5=88=97?= =?UTF-8?q?=E5=9C=A8=E5=B7=A6=E8=BE=B9=E6=97=B6,=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=8C=89=E9=92=AEconfirm=E8=B6=85=E5=87=BA=E5=B1=8F=E5=B9=95?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/js/require-table.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/assets/js/require-table.js b/public/assets/js/require-table.js index 93cd0c4c3..1d75d3aed 100644 --- a/public/assets/js/require-table.js +++ b/public/assets/js/require-table.js @@ -354,7 +354,10 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table } if ($(window).width() < 480) { top = left = undefined; - } + } + // 如果位置超出屏幕左边 则设置为1(设置为0的话会在屏幕中间弹出) + top = (top > 0) ? top : 1; + left = (left > 0) ? left : 1; Layer.confirm( __('Are you sure you want to delete this item?'), {icon: 3, title: __('Warning'), offset: [top, left], shadeClose: true}, -- Gitee