优化UI的右侧打开页面的打开效果,宽度自适应度增强。

This commit is contained in:
hdm 2022-10-13 17:53:08 +08:00
parent 3e02defc49
commit 98362bcdf2

View File

@ -9,10 +9,16 @@ layui.define([], function (exports) {
return false;
}
that.loading = true;
var sideWidth = window.innerWidth > 1280 ? '1200px' : '996px';
var countWidth = window.innerWidth-(window.innerWidth*0.5)+456;
if(window.innerWidth<=1000){
countWidth = 750;
}
if (width && width > 0) {
sideWidth = width + 'px';
}
else{
sideWidth = countWidth + 'px';
}
layer.open({
type: 2,
title: '',
@ -37,8 +43,11 @@ layui.define([], function (exports) {
})
})
$(window).resize(function () {
width = window.innerWidth > 1280 ? '1200' : '996';
obj.width(width);
var resizeWidth = window.innerWidth-(window.innerWidth*0.5)+456;
if(window.innerWidth<=1000){
resizeWidth = 750;
}
obj.width(resizeWidth);
})
}
})
@ -50,10 +59,16 @@ layui.define([], function (exports) {
return false;
}
that.loading = true;
var sideWidth = window.innerWidth > 1280 ? '1200px' : '996px';
var countWidth = window.innerWidth-(window.innerWidth*0.5)+456;
if(window.innerWidth<=1000){
countWidth = 750;
}
if (width && width > 0) {
sideWidth = width + 'px';
}
else{
sideWidth = countWidth + 'px';
}
$.ajax({
url: url,
type: "GET",
@ -88,8 +103,11 @@ layui.define([], function (exports) {
})
})
$(window).resize(function () {
width = window.innerWidth > 1280 ? '1200' : '996';
$('#expressLayer').width(width);
var resizeWidth = window.innerWidth-(window.innerWidth*0.5)+456;
if(window.innerWidth<=1000){
resizeWidth = 750;
}
$('#expressLayer').width(resizeWidth);
})
}