Tooltip: fix extra spaces before class 'focusing' when focus multi times

This commit is contained in:
Jason Yin 2017-12-06 13:27:34 +08:00 committed by 杨奕
parent b566c6156d
commit 0f7dcb9d32

View File

@ -1,5 +1,6 @@
import Popper from 'element-ui/src/utils/vue-popper';
import debounce from 'throttle-debounce/debounce';
import { addClass, removeClass } from 'element-ui/src/utils/dom';
import { getFirstComponentChild } from 'element-ui/src/utils/vdom';
import { generateId } from 'element-ui/src/utils/util';
import Vue from 'vue';
@ -122,9 +123,9 @@ export default {
watch: {
focusing(val) {
if (val) {
this.referenceElm.className += ' focusing';
addClass(this.referenceElm, 'focusing');
} else {
this.referenceElm.className = this.referenceElm.className.replace('focusing', '');
removeClass(this.referenceElm, 'focusing');
}
}
},