From 98362bcdf29653a84dc9a53d6f8da02964dd8fa8 Mon Sep 17 00:00:00 2001 From: hdm Date: Thu, 13 Oct 2022 17:53:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96UI=E7=9A=84=E5=8F=B3=E4=BE=A7?= =?UTF-8?q?=E6=89=93=E5=BC=80=E9=A1=B5=E9=9D=A2=E7=9A=84=E6=89=93=E5=BC=80?= =?UTF-8?q?=E6=95=88=E6=9E=9C=EF=BC=8C=E5=AE=BD=E5=BA=A6=E8=87=AA=E9=80=82?= =?UTF-8?q?=E5=BA=94=E5=BA=A6=E5=A2=9E=E5=BC=BA=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/static/assets/gougu/module/tool.js | 30 ++++++++++++++++++----- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/public/static/assets/gougu/module/tool.js b/public/static/assets/gougu/module/tool.js index 51d1b01..a885032 100644 --- a/public/static/assets/gougu/module/tool.js +++ b/public/static/assets/gougu/module/tool.js @@ -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); }) }