[Vuejs]-How to remove fade-out transition in tooltip component from element-ui?

0👍

Use transition prop with empty value.

<el-tooltip
  placement="bottom"
  :content="my text"
  :enterable="false"
  transition="" <-- add this prop
>
  <div class="custom-item">Next</div>
</el-tooltip>

0👍

Wanted to achieve the same but unfortunately, they have 200ms debounce hardcoded on mouseleave

this.debounceClose = debounce(200, () => this.handleClosePopper());

https://github.com/ElemeFE/element/blob/dev/packages/tooltip/src/main.js#L75


Hacky way to achieve it:

<el-tooltip
  transition=""
  :disabled="tooltipDisabled"
>
  <button
    @mouseleave="tooltipDisabled = true"
    @mouseenter="tooltipDisabled = false"
  ></button>
</el-tooltip>

Leave a comment