mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-16 11:44:01 +08:00
Tooltip: add manual feature
This commit is contained in:
@@ -33,6 +33,7 @@ export default {
|
||||
default: 0
|
||||
},
|
||||
disabled: Boolean,
|
||||
manual: Boolean,
|
||||
effect: {
|
||||
type: String,
|
||||
default: 'dark'
|
||||
@@ -57,12 +58,14 @@ export default {
|
||||
|
||||
methods: {
|
||||
handleShowPopper() {
|
||||
if (this.manual) return;
|
||||
this.timeout = setTimeout(() => {
|
||||
this.showPopper = true;
|
||||
}, this.openDelay);
|
||||
},
|
||||
|
||||
handleClosePopper() {
|
||||
if (this.manual) return;
|
||||
clearTimeout(this.timeout);
|
||||
this.showPopper = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user