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) {
|
unbind(el) {
|
||||||
nodeList.splice(el[ctx].id, 1);
|
let len = nodeList.length;
|
||||||
delete el[ctx];
|
|
||||||
},
|
|
||||||
|
|
||||||
install(Vue) {
|
for (let i = 0; i < len; i++) {
|
||||||
/* istanbul ignore next */
|
if (nodeList[i][ctx].id === el[ctx].id) {
|
||||||
Vue.directive('clickoutside', {
|
nodeList.splice(i, 1);
|
||||||
bind: this.bind,
|
delete el[ctx];
|
||||||
unbind: this.unbind
|
break;
|
||||||
});
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue