mirror of
https://gitee.com/ElemeFE/element.git
synced 2024-11-29 18:57:36 +08:00
Tooltip: fix extra spaces before class 'focusing' when focus multi times
This commit is contained in:
parent
b566c6156d
commit
0f7dcb9d32
@ -1,5 +1,6 @@
|
|||||||
import Popper from 'element-ui/src/utils/vue-popper';
|
import Popper from 'element-ui/src/utils/vue-popper';
|
||||||
import debounce from 'throttle-debounce/debounce';
|
import debounce from 'throttle-debounce/debounce';
|
||||||
|
import { addClass, removeClass } from 'element-ui/src/utils/dom';
|
||||||
import { getFirstComponentChild } from 'element-ui/src/utils/vdom';
|
import { getFirstComponentChild } from 'element-ui/src/utils/vdom';
|
||||||
import { generateId } from 'element-ui/src/utils/util';
|
import { generateId } from 'element-ui/src/utils/util';
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
@ -122,9 +123,9 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
focusing(val) {
|
focusing(val) {
|
||||||
if (val) {
|
if (val) {
|
||||||
this.referenceElm.className += ' focusing';
|
addClass(this.referenceElm, 'focusing');
|
||||||
} else {
|
} else {
|
||||||
this.referenceElm.className = this.referenceElm.className.replace('focusing', '');
|
removeClass(this.referenceElm, 'focusing');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user