mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-16 11:44:01 +08:00
update doc (#7033)
* Tooltip: update zh-CN doc * Tooltip: update en doc * Autocomplete: update docs
This commit is contained in:
@@ -88,16 +88,17 @@ export default {
|
||||
if (!this.$slots.default || !this.$slots.default.length) return this.$slots.default;
|
||||
|
||||
const vnode = getFirstComponentChild(this.$slots.default);
|
||||
if (!vnode || this.handlerAdded) return vnode;
|
||||
if (!vnode) return vnode;
|
||||
const data = vnode.data = vnode.data || {};
|
||||
const on = vnode.data.on = vnode.data.on || {};
|
||||
const nativeOn = vnode.data.nativeOn = vnode.data.nativeOn || {};
|
||||
|
||||
data.staticClass = this.concatClass(data.staticClass, 'el-tooltip');
|
||||
if (this.handlerAdded) return vnode;
|
||||
on.mouseenter = this.addEventHandle(on.mouseenter, () => { this.setExpectedState(true); this.handleShowPopper(); });
|
||||
on.mouseleave = this.addEventHandle(on.mouseleave, () => { this.setExpectedState(false); this.debounceClose(); });
|
||||
nativeOn.mouseenter = this.addEventHandle(nativeOn.mouseenter, () => { this.setExpectedState(true); this.handleShowPopper(); });
|
||||
nativeOn.mouseleave = this.addEventHandle(nativeOn.mouseleave, () => { this.setExpectedState(false); this.debounceClose(); });
|
||||
data.staticClass = this.concatClass(data.staticClass, 'el-tooltip');
|
||||
|
||||
return vnode;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user