- {
- this.setExpectedState(false)
- this.debounceClose()
- }}
- onMouseenter={() => {
- this.setExpectedState(true)
- }}
- ref="popper"
- role="tooltip"
- id={this.tooltipId}
- aria-hidden={this.disabled || !this.showPopper ? 'true' : 'false'}
- v-show={!this.disabled && this.showPopper}
- class={[
- 'el-tooltip__popper',
- 'is-' + this.effect,
- this.popperClass
- ]}
- >
- {this.$slots.content || this.content}
-
- //
+ this.popperVM.node = h(_Transition, {
+ name: this.transition,
+ onAfterLeave: this.doDestroy
+ },
+ [
+ h('div',
+ {
+ onMouseleave: () => {
+ this.setExpectedState(false)
+ this.debounceClose()
+ },
+ onMouseenter: () => {
+ this.setExpectedState(true)
+ },
+ ref: "popper",
+ role: "tooltip",
+ id: this.tooltipId,
+ 'aria-hidden': this.disabled || !this.showPopper ? 'true' : 'false',
+ directives: [
+ {
+ name: 'show',
+ value: !this.disabled && this.showPopper
+ }
+ ],
+ class: [
+ 'el-tooltip__popper',
+ 'is-' + this.effect,
+ this.popperClass
+ ]
+ },
+ (this.$slots.content || this.content)
+ )
+ ]
)
+ // this.popperVM.mount('body');
}
const firstElement = this.getFirstElement()
@@ -225,6 +243,7 @@ export default {
if (!Array.isArray(slots)) return null
let element = null
for (let index = 0; index < slots.length; index++) {
+ console.log(slots[index], 'slots[index]');
// if (slots[index] && slots[index].tag) {
element = slots[index]
// }
diff --git a/packages/tooltip/src/main.vue b/packages/tooltip/src/main.vue
index b9c268381..e48a1c08c 100644
--- a/packages/tooltip/src/main.vue
+++ b/packages/tooltip/src/main.vue
@@ -14,7 +14,7 @@
popperClass
]"
>
-