mirror of https://github.com/ElemeFE/element
Tooltip: lazy => openDelay
parent
c0aecc9ce1
commit
9a5650f3db
|
@ -210,5 +210,5 @@ Tooltip 组件提供了两个不同的主题:`dark`和`light`,可以通过
|
||||||
| transition | 定义渐变动画 | String | | `fade-in-linear` |
|
| transition | 定义渐变动画 | String | | `fade-in-linear` |
|
||||||
| visible-arrow | 是否显示 Tooltip 箭头,更多参数可见[Vue-popper](https://github.com/element-component/vue-popper) | Boolean | | true |
|
| visible-arrow | 是否显示 Tooltip 箭头,更多参数可见[Vue-popper](https://github.com/element-component/vue-popper) | Boolean | | true |
|
||||||
| options | [popper.js](https://popper.js.org/documentation.html) 的参数 | Object | 参考 [popper.js](https://popper.js.org/documentation.html) 文档 | `{ boundariesElement: 'body', gpuAcceleration: false }` |
|
| options | [popper.js](https://popper.js.org/documentation.html) 的参数 | Object | 参考 [popper.js](https://popper.js.org/documentation.html) 文档 | `{ boundariesElement: 'body', gpuAcceleration: false }` |
|
||||||
| lazy | 延迟出现,单位毫秒 | Number | | 0 |
|
| openDelay | 延迟出现,单位毫秒 | Number | | 0 |
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ export default {
|
||||||
mixins: [Popper],
|
mixins: [Popper],
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
lazy: {
|
openDelay: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 0
|
default: 0
|
||||||
},
|
},
|
||||||
|
@ -59,7 +59,7 @@ export default {
|
||||||
handleShowPopper() {
|
handleShowPopper() {
|
||||||
this.timeout = setTimeout(() => {
|
this.timeout = setTimeout(() => {
|
||||||
this.showPopper = true;
|
this.showPopper = true;
|
||||||
}, this.lazy);
|
}, this.openDelay);
|
||||||
},
|
},
|
||||||
|
|
||||||
handleClosePopper() {
|
handleClosePopper() {
|
||||||
|
|
Loading…
Reference in New Issue