From f2eb4570ef6c5a88db639c34c77aae67d6ee67a8 Mon Sep 17 00:00:00 2001 From: hdm Date: Thu, 27 Apr 2023 12:11:06 +0800 Subject: [PATCH] =?UTF-8?q?layui=E5=8D=87=E7=BA=A7=E5=88=B02.8.1=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E4=BC=98=E5=8C=96=E7=B3=BB=E7=BB=9F=E7=9A=84=E5=8F=B3?= =?UTF-8?q?=E4=BE=A7=E5=BC=B9=E5=87=BA=E5=B1=82=EF=BC=8C=E6=8F=90=E9=AB=98?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E6=95=B4=E4=BD=93=E7=9A=84=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E4=BD=93=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/static/assets/gougu/css/gougu.css | 25 +-------- public/static/assets/gougu/module/tool.js | 67 ++++++++++++----------- 2 files changed, 35 insertions(+), 57 deletions(-) diff --git a/public/static/assets/gougu/css/gougu.css b/public/static/assets/gougu/css/gougu.css index 1e7a2dd..1dfc818 100644 --- a/public/static/assets/gougu/css/gougu.css +++ b/public/static/assets/gougu/css/gougu.css @@ -310,30 +310,7 @@ div.layui-table-main::-webkit-scrollbar-thumb:active{background-color:rgba(0,0,0 .editormd{margin-bottom:0!important;} .CodeMirror-gutters{background-color:#fafafa!important;} -@keyframes layui-rl{ - from{transform:translateX(0px);}to{transform:translateX(-100%);} -} -@-webkit-keyframes layui-rl{ - from{transform:translateX(0px);}to{transform:translateX(-100%);} -} -.layui-anim { - -webkit-animation-duration: .3s; - animation-duration: .3s; - -webkit-animation-fill-mode: both; - animation-fill-mode: both; -} -.layui-anim-rl { - -webkit-animation-name: layui-rl; - animation-name: layui-rl; -} -.layui-layer-admin-right { - box-shadow: 1px 1px 10px rgba(0,0,0,.1); - border-radius: 0!important; - overflow: auto; -} -.layui-anim-rl.layui-layer-iframe{ - overflow:initial!important; -} +.layui-layer-gougu-admin {box-shadow: 1px 1px 10px rgba(0,0,0,.1); border-radius: 0!important;overflow:initial!important;} .express-box { position: fixed; z-index:9999; height:100%; right: -100%; top:0;background-color: #fff;} .express-box article{width:100%; height:100%; overflow:auto;} .express-mask{ display: none; position: fixed; top: 0; left: 0; z-index: 9998; width: 100%; height: 100%; background-color: rgba(0,0,0,.6); } diff --git a/public/static/assets/gougu/module/tool.js b/public/static/assets/gougu/module/tool.js index 0e90009..3e1fd30 100644 --- a/public/static/assets/gougu/module/tool.js +++ b/public/static/assets/gougu/module/tool.js @@ -9,47 +9,37 @@ layui.define([], function (exports) { return false; } that.loading = true; - var countWidth = window.innerWidth-(window.innerWidth*0.5)+456; + sideWidth = '80%'; if(window.innerWidth<=1000){ - countWidth = 750; + sideWidth = '92%'; } - if (width && width > 0) { - sideWidth = width + 'px'; - } - else{ - sideWidth = countWidth + 'px'; + if(window.innerWidth>1000 && window.innerWidth<=1440){ + sideWidth = '88%'; } layer.open({ type: 2, - title: '', - offset: ['0', '100%'], - skin: 'layui-anim layui-anim-rl layui-layer-admin-right', + title: false, + offset: 'r', + anim: 'slideLeft', closeBtn: 0, content: url, area: [sideWidth, '100%'], - success: function (obj, index) { - var btn = '
关闭
'; - obj.append(btn); - $('body').addClass('right-open'); - that.loading = false; - obj.on('click','.express-close', function () { - let op_width = obj.outerWidth(); - obj.animate({ left: '+=' + op_width + 'px' }, 200, 'linear', function () { - $('body').removeClass('right-open'); - layer.close(index); - if (layui.pageTable) { - layui.pageTable.resize(); - } - }) - }) - $(window).resize(function () { - var resizeWidth = window.innerWidth-(window.innerWidth*0.5)+456; - if(window.innerWidth<=1000){ - resizeWidth = 750; - } - obj.width(resizeWidth); - }) + skin:'layui-layer-gougu-admin', + end: function(){ + $('body').removeClass('right-open'); + if (layui.pageTable) { + layui.pageTable.resize(); } + }, + success: function (obj, index) { + var btn = '
关闭
'; + obj.append(btn); + $('body').addClass('right-open'); + that.loading = false; + obj.on('click','.express-close', function () { + layer.close(index); + }) + } }) }, //右侧ajax请求的方式打开页面参考勾股DEV @@ -281,7 +271,7 @@ layui.define([], function (exports) { } } }; - + //时间选择快捷操作 $('body').on('click', '.tool-time', function () { let that = $(this); let type = that.data('type'); @@ -296,6 +286,17 @@ layui.define([], function (exports) { return false; }); + //搜索表单重置快捷操作 + $('body').on('click', '[lay-filter="reset"]', function () { + let that = $(this); + let prev = that.prev(); + if (typeof(prev) != "undefined") { + setTimeout(function () { + prev.click(); + }, 10) + } + }); + $('body').on('click', '.tab-a', function () { let id = $(this).data('id'); let url = $(this).data('href');