optimize Slider that sometime Tooltip shaking

optimize Slider that sometime Tooltip shaking(add controlled prop in
Tooltip component)
This commit is contained in:
梁灏 2016-11-11 18:22:53 +08:00
parent b79b53ea6f
commit 73772536d6
3 changed files with 11 additions and 5 deletions

View file

@ -37,6 +37,10 @@
disabled: {
type: Boolean,
default: false
},
controlled: { // under this prop,Tooltip will not close when mouseleave
type: Boolean,
default: false
}
},
data () {
@ -52,7 +56,9 @@
},
handleClosePopper() {
clearTimeout(this.timeout);
this.visible = false;
if (!this.controlled) {
this.visible = false;
}
}
}
}