From ee102105eaf13ea1791da029a7d0b4307fe43b13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B1=E7=9C=A0=E4=BB=AA=E5=BC=8F?= <854085467@qq.com> Date: Thu, 4 Feb 2021 15:01:16 +0800 Subject: [PATCH] update component/pear/modules/drawer.js. --- component/pear/modules/drawer.js | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/component/pear/modules/drawer.js b/component/pear/modules/drawer.js index 4479220..2ef84e7 100644 --- a/component/pear/modules/drawer.js +++ b/component/pear/modules/drawer.js @@ -7,9 +7,9 @@ layui.define(['jquery', 'element'], function(exports) { var MOD_NAME = 'drawer', $ = layui.jquery, element = layui.element; - + var drawer = new function() { - + /** * open drawer * */ @@ -18,16 +18,16 @@ layui.define(['jquery', 'element'], function(exports) { dom: option.dom, direction: option.direction, distance: option.distance, - time:option.time?option.time:0, - maskClose:option.maskClose, - callback:option.success + time: option.time ? option.time : 0, + maskClose: option.maskClose, + callback: option.success }); obj.open(); return obj; } - + } - exports(MOD_NAME,drawer); + exports(MOD_NAME, drawer); }); /** @@ -121,7 +121,7 @@ layui.define(['jquery', 'element'], function(exports) { g.wrap.style.left = "0"; g.wrap.style.width = "100%"; g.wrap.style.height = "100%"; - g.wrap.style.zIndex = 99999999999; + g.wrap.style.zIndex = 9999999; g.inner.style.position = "absolute"; g.inner.style.top = g.top; g.inner.style.bottom = g.bottom; @@ -133,14 +133,12 @@ layui.define(['jquery', 'element'], function(exports) { g.inner.style.transform = "translate3d(" + g.translate + ")"; g.inner.style.webkitTransition = "all .2s ease-out"; g.inner.style.transition = "all .2s ease-out"; - g.inner.style.zIndex = 100000000000; + g.inner.style.zIndex = 10000000; g.mask.style.width = "100%"; g.mask.style.height = "100%"; - g.mask.style.opacity = "0"; + g.mask.style.opacity = "0.1"; g.mask.style.backgroundColor = "black"; - g.mask.style.zIndex = "99999999998"; - g.mask.style.webkitTransition = "all .2s ease-out"; - g.mask.style.transition = "all .2s ease-out"; + g.mask.style.zIndex = "9999998"; g.mask.style.webkitBackfaceVisibility = "hidden"; g.events() }, @@ -151,7 +149,7 @@ layui.define(['jquery', 'element'], function(exports) { setTimeout(function() { d.inner.style.transform = "translate3d(0,0,0)"; d.inner.style.webkitTransform = "translate3d(0,0,0)"; - d.mask.style.opacity = 0.5 + d.mask.style.opacity = 0.1 }, 30); if (d.opts.time) { d.timer = setTimeout(function() { @@ -184,4 +182,4 @@ layui.define(['jquery', 'element'], function(exports) { } }; b.mSlider = a -})(window); +})(window); \ No newline at end of file