Commit e9082389 authored by Leopoldthecoder's avatar Leopoldthecoder Committed by 杨奕

Clickoutside: id should be unique among all nodes

parent 070f60c3
......@@ -5,6 +5,7 @@ const nodeList = [];
const ctx = '@@clickoutsideContext';
let startClick;
let seed = 0;
!Vue.prototype.$isServer && on(document, 'mousedown', e => (startClick = e));
......@@ -21,7 +22,8 @@ let startClick;
*/
export default {
bind(el, binding, vnode) {
const id = nodeList.push(el) - 1;
nodeList.push(el);
const id = seed++;
const documentHandler = function(mouseup = {}, mousedown = {}) {
if (!vnode.context ||
!mouseup.target ||
......
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