又窗口打开页面效果优化

This commit is contained in:
hdm 2022-04-19 12:11:37 +08:00
parent c8a2a58444
commit aeaa354d47
2 changed files with 6 additions and 4 deletions

View File

@ -19,7 +19,7 @@
background-color: #c1c1c1;
border-radius: 8px;
}
body.right-open{overflow-y:clip;}
div.layui-table-main::-webkit-scrollbar{width:15px;height:15px}
div.layui-table-main::-webkit-scrollbar-thumb{min-width:15px;min-height:15px;background-color:rgba(0,0,0,.15);background-clip:content-box;border:2px solid transparent;border-radius:15px}
div.layui-table-main::-webkit-scrollbar-track{background-color:transparent}

View File

@ -18,11 +18,13 @@ layui.define(['layer'], function(exports){
if($('#rightPopup'+index).length<1){
var btn='<div id="rightPopup'+index+'" class="right-popup-close" title="关闭">关闭</div>';
obj.append(btn);
$('body').addClass('right-open');
$('#rightPopup'+index).click(function(){
let op_width = $('.layui-anim-rl').outerWidth();
$('.layui-anim-rl').animate({left:'+='+op_width+'px'}, 200, 'linear', function () {
$('.layui-anim-rl').remove()
$('.layui-layer-shade').remove()
$('.layui-anim-rl').animate({left:'+='+op_width+'px'}, 200, 'linear', function () {
$('body').removeClass('right-open');
$('.layui-anim-rl').remove();
$('.layui-layer-shade').remove();
})
})
}