optimize Slider that sometime Tooltip shaking
optimize Slider that sometime Tooltip shaking(add controlled prop in Tooltip component)
This commit is contained in:
parent
b79b53ea6f
commit
73772536d6
3 changed files with 11 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue