mirror of https://github.com/ElemeFE/element
Clickoutside: removing element from the queue
parent
23d282bb4f
commit
56f4167c3c
|
@ -45,15 +45,14 @@ export default {
|
|||
},
|
||||
|
||||
unbind(el) {
|
||||
nodeList.splice(el[ctx].id, 1);
|
||||
delete el[ctx];
|
||||
},
|
||||
let len = nodeList.length;
|
||||
|
||||
install(Vue) {
|
||||
/* istanbul ignore next */
|
||||
Vue.directive('clickoutside', {
|
||||
bind: this.bind,
|
||||
unbind: this.unbind
|
||||
});
|
||||
for (let i = 0; i < len; i++) {
|
||||
if (nodeList[i][ctx].id === el[ctx].id) {
|
||||
nodeList.splice(i, 1);
|
||||
delete el[ctx];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue