From 99b95e67e1c1bc29214bb3993572eae352d5e1d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E5=A4=A9?= Date: Sat, 19 May 2018 13:15:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96layer=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E7=9A=84=E5=9B=9E=E6=94=B6,=E9=81=BF=E5=85=8D=E5=9C=A8?= =?UTF-8?q?=E6=9E=81=E7=AB=AF=E5=9C=BA=E6=99=AF=E4=B8=8B=E7=9A=84=E5=BC=82?= =?UTF-8?q?=E5=B8=B8;=E6=9B=B4=E6=96=B0meditor=E9=99=84=E4=BB=B6=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E6=9C=BA=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/layer/index.js | 15 ++++++++---- src/js/meditor/addon/attach.js | 40 ++++++++++++++++++-------------- src/js/meditor/addon/attach.scss | 18 +++++++------- 3 files changed, 42 insertions(+), 31 deletions(-) diff --git a/src/js/layer/index.js b/src/js/layer/index.js index 161da7f..8200f33 100644 --- a/src/js/layer/index.js +++ b/src/js/layer/index.js @@ -58,11 +58,16 @@ const close = function(id) { layerDom[id][1].classList.add('shift') layerDom[id][0].style.opacity = '' layerDom[id][1].style.opacity = 0 - setTimeout(_ => { - document.body.removeChild(layerDom[id][0]) - delete layerDom[id] - delete Anot.vmodels[id] - }, 200) + setTimeout( + (_ => { + return function() { + document.body.removeChild(layerDom[_][0]) + delete layerDom[_] + delete Anot.vmodels[_] + } + })(id), + 200 + ) } catch (err) {} } document.body.style.overflow = '' diff --git a/src/js/meditor/addon/attach.js b/src/js/meditor/addon/attach.js index 85a8d82..3452141 100644 --- a/src/js/meditor/addon/attach.js +++ b/src/js/meditor/addon/attach.js @@ -209,7 +209,7 @@ const fixCont = function(vm, tool) {