Pre Merge pull request !86 from 张尧嵩/master

pull/86/MERGE
张尧嵩 2018-11-26 11:45:44 +08:00
commit 1a74fbc755
1 changed files with 4 additions and 1 deletions

View File

@ -355,6 +355,9 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table
if ($(window).width() < 480) { if ($(window).width() < 480) {
top = left = undefined; top = left = undefined;
} }
// 如果位置超出屏幕左边 则设置为1(设置为0的话会在屏幕中间弹出)
top = (top > 0) ? top : 1;
left = (left > 0) ? left : 1;
Layer.confirm( Layer.confirm(
__('Are you sure you want to delete this item?'), __('Are you sure you want to delete this item?'),
{icon: 3, title: __('Warning'), offset: [top, left], shadeClose: true}, {icon: 3, title: __('Warning'), offset: [top, left], shadeClose: true},