mirror of https://github.com/ElemeFE/element
Clickoutside: id should be unique among all nodes
parent
070f60c307
commit
e90823898b
|
@ -5,6 +5,7 @@ const nodeList = [];
|
||||||
const ctx = '@@clickoutsideContext';
|
const ctx = '@@clickoutsideContext';
|
||||||
|
|
||||||
let startClick;
|
let startClick;
|
||||||
|
let seed = 0;
|
||||||
|
|
||||||
!Vue.prototype.$isServer && on(document, 'mousedown', e => (startClick = e));
|
!Vue.prototype.$isServer && on(document, 'mousedown', e => (startClick = e));
|
||||||
|
|
||||||
|
@ -21,7 +22,8 @@ let startClick;
|
||||||
*/
|
*/
|
||||||
export default {
|
export default {
|
||||||
bind(el, binding, vnode) {
|
bind(el, binding, vnode) {
|
||||||
const id = nodeList.push(el) - 1;
|
nodeList.push(el);
|
||||||
|
const id = seed++;
|
||||||
const documentHandler = function(mouseup = {}, mousedown = {}) {
|
const documentHandler = function(mouseup = {}, mousedown = {}) {
|
||||||
if (!vnode.context ||
|
if (!vnode.context ||
|
||||||
!mouseup.target ||
|
!mouseup.target ||
|
||||||
|
|
Loading…
Reference in New Issue