修复操作列在左边时,删除按钮confirm超出屏幕的bug

pull/87/head
zhang 2018-11-26 11:42:10 +08:00
parent 2000a876dd
commit e182a459a5
1 changed files with 4 additions and 1 deletions

View File

@ -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},