mirror of
https://gitee.com/ElemeFE/element.git
synced 2024-12-02 04:08:10 +08:00
Tooltip: fix appear in the wrong place
This commit is contained in:
parent
ed79d85379
commit
80fe4ce1f3
@ -6,6 +6,7 @@
|
||||
|
||||
- 修复 Select 多选时选项变为空数组后 placeholder 不出现的问题
|
||||
- 修复 TimePicker 时间选择可滚动
|
||||
- 修复 Tooltip 会有出现错位的情况
|
||||
|
||||
#### 非兼容性更新
|
||||
- Select 组件样式的 `display` 属性默认值修改为 `block`
|
||||
|
@ -68,12 +68,11 @@
|
||||
"theaterjs": "^3.0.0",
|
||||
"uppercamelcase": "^1.1.0",
|
||||
"url-loader": "^0.5.7",
|
||||
"vue": "2.0.0-rc.3",
|
||||
"vue-loader": "9.3.2",
|
||||
"vue": "^2.0.0-rc.6",
|
||||
"vue-loader": "^9.4.2",
|
||||
"vue-markdown-loader": "^0.4.0",
|
||||
"vue-popup": "^0.2.3",
|
||||
"vue-router": "^2.0.0-beta.2",
|
||||
"vue-template-compiler": "2.0.0-rc.3",
|
||||
"webpack": "^1.13.2",
|
||||
"webpack-dev-server": "^1.15.1",
|
||||
"wind-dom": "0.0.3"
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<span>
|
||||
<transition :name="transition">
|
||||
<transition :name="transition" @after-leave="doDestroy">
|
||||
<div
|
||||
class="el-popover"
|
||||
ref="popper"
|
||||
|
@ -7,7 +7,7 @@
|
||||
<slot></slot>
|
||||
</div>
|
||||
|
||||
<transition :name="transition">
|
||||
<transition :name="transition" @after-leave="doDestroy">
|
||||
<div
|
||||
class="el-tooltip__popper"
|
||||
:class="['is-' + effect]"
|
||||
|
@ -1,5 +1,5 @@
|
||||
import PopperJS from 'main/utils/popper';
|
||||
import { once } from 'wind-dom/src/event';
|
||||
|
||||
/**
|
||||
* @param {HTMLElement} [reference=$refs.reference] - The reference element used to position the popper.
|
||||
* @param {HTMLElement} [popper=$refs.popper] - The HTML element used as popper, or a configuration used to generate the popper.
|
||||
@ -100,20 +100,13 @@ export default {
|
||||
|
||||
doDestroy() {
|
||||
if (this.showPopper) return;
|
||||
this.popperJS && this.popperJS.destroy();
|
||||
this.popperJS.destroy();
|
||||
this.popperJS = null;
|
||||
},
|
||||
|
||||
destroyPopper() {
|
||||
if (this.popperJS) {
|
||||
this.resetTransformOrigin(this.popperJS);
|
||||
if (this.transition) {
|
||||
once(this.popperJS._popper, 'webkitTransitionEnd', this.doDestroy);
|
||||
once(this.popperJS._popper, 'oTransitionend', this.doDestroy);
|
||||
once(this.popperJS._popper, 'transitionend', this.doDestroy);
|
||||
} else {
|
||||
this.doDestroy();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user