Commit d598c1d9 authored by 何虹's avatar 何虹 💬

优化日期框隐藏

parent 42ab9ca7
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
:fullscreen='configData.fullscreen' :fullscreen='configData.fullscreen'
:append-to-body="true" :append-to-body="true"
:before-close="handleClose" :before-close="handleClose"
:destroy-on-close='true'
> >
<slot name="body"></slot> <slot name="body"></slot>
<slot name="footer"></slot> <slot name="footer"></slot>
......
...@@ -12,11 +12,11 @@ export default { ...@@ -12,11 +12,11 @@ export default {
event.stopPropagation() event.stopPropagation()
} }
el.addEventListener('click', el.stopProp) el.addEventListener('click', el.stopProp)
document.body.addEventListener('click', el.handler, true) document.body.addEventListener('click', el.handler, false)
}, },
unbind(el, binding) { unbind(el, binding) {
el.removeEventListener('click', el.stopProp) el.removeEventListener('click', el.stopProp)
document.body.removeEventListener('click', el.handler, true) document.body.removeEventListener('click', el.handler, false)
}, },
install(Vue) { install(Vue) {
Vue.directive('clickoutside', { Vue.directive('clickoutside', {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment