Update v-click-outside-x and use project wide directive
This commit is contained in:
parent
427b869297
commit
26369639b6
15 changed files with 15962 additions and 16013 deletions
|
@ -1,21 +0,0 @@
|
|||
export default {
|
||||
bind (el, binding, vnode) {
|
||||
function documentHandler (e) {
|
||||
if (el.contains(e.target)) {
|
||||
return false;
|
||||
}
|
||||
if (binding.expression) {
|
||||
binding.value(e);
|
||||
}
|
||||
}
|
||||
el.__vueClickOutside__ = documentHandler;
|
||||
document.addEventListener('click', documentHandler);
|
||||
},
|
||||
update () {
|
||||
|
||||
},
|
||||
unbind (el, binding) {
|
||||
document.removeEventListener('click', el.__vueClickOutside__);
|
||||
delete el.__vueClickOutside__;
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue