diff --git a/src/css/layer-normal.scss b/src/css/layer-normal.scss index 07fb98c..884e660 100644 --- a/src/css/layer-normal.scss +++ b/src/css/layer-normal.scss @@ -191,7 +191,7 @@ } - &.mask {position:fixed;z-index:65534;left:0;top:0;width:100%;height:100%;background:rgba(0,0,0,.3); + &.mask {position:fixed;z-index:65534;left:0;top:0;width:100%;height:100%;background:transparent; &.shift {transition: all .5s ease-out;} &.inner {position:absolute;} diff --git a/src/layer/index.js b/src/layer/index.js index 59a49bd..c6dbeb8 100644 --- a/src/layer/index.js +++ b/src/layer/index.js @@ -58,16 +58,11 @@ const close = function(id) { layerDom[id][1].classList.add('shift') layerDom[id][0].style.opacity = '' layerDom[id][1].style.opacity = 0 - setTimeout( - (_ => { - return function() { - document.body.removeChild(layerDom[_][0]) - delete layerDom[_] - delete Anot.vmodels[_] - } - })(id), - 200 - ) + setTimeout(function() { + layerDom[id][0].parentNode.removeChild(layerDom[id][0]) + delete layerDom[id] + delete Anot.vmodels[id] + }, 200) } catch (err) {} } document.body.style.overflow = '' @@ -510,12 +505,12 @@ class __layer__ { // 为loading类型时,自动关闭同时触发回调 if (state.type === 6) { - this.vm.props.yes($id) + this.vm.props.yes.call(this.vm, $id) } }, state.timeout) } else if (state.type === 6) { // loading类型, 非自动关闭时, 主动触发回调 - this.vm.props.yes($id) + this.vm.props.yes.call(this.vm, $id) } } } diff --git a/src/meditor/addon/base.js b/src/meditor/addon/base.js index 6fb9ae5..31701db 100644 --- a/src/meditor/addon/base.js +++ b/src/meditor/addon/base.js @@ -31,7 +31,6 @@ const addon = { type: 7, menubar: false, maskClose: true, - maskColor: 'rgba(255,255,255,0)', fixed: true, insert: function(level) { wrap = wrap.replace(/^(#{1,6} )?/, '#'.repeat(level) + ' ') @@ -113,7 +112,6 @@ const addon = { type: 7, menubar: false, maskClose: true, - maskColor: 'rgba(255,255,255,0)', fixed: true, link: '', linkName: wrap, @@ -188,7 +186,6 @@ const addon = { title: '插入表情', fixed: true, maskClose: true, - maskColor: 'rgba(255,255,255,0)', arr: [ '😀', '😅', @@ -257,7 +254,6 @@ const addon = { title: '0行 x 0列', fixed: true, maskClose: true, - maskColor: 'rgba(255,255,255,0)', offset: [ offset.top + 35 - $doc.scrollTop(), 'auto', @@ -336,7 +332,6 @@ const addon = { type: 7, menubar: false, maskClose: true, - maskColor: 'rgba(255,255,255,0)', fixed: true, img: '', imgAlt: wrap, @@ -481,7 +476,6 @@ const addon = { type: 7, title: '关于编辑器', maskClose: true, - maskColor: 'rgba(255,255,255,0)', offset: [offset.top + 35 - $doc.scrollTop()], shift: { top: offset.top - $doc.scrollTop() }, content: