diff --git a/examples/docs/en-US/popover.md b/examples/docs/en-US/popover.md index ca096281..7e68fd0f 100644 --- a/examples/docs/en-US/popover.md +++ b/examples/docs/en-US/popover.md @@ -217,7 +217,7 @@ Of course, you can nest other operations. It's more light-weight than using a di | offset | popover offset | number | — | 0 | | transition | popover transition animation | string | — | fade-in-linear | | visible-arrow | whether a tooltip arrow is displayed or not. For more info, please refer to [Vue-popper](https://github.com/element-component/vue-popper) | boolean | — | true | -| options | parameters for [popper.js](https://popper.js.org/documentation.html) | object | please refer to [popper.js](https://popper.js.org/documentation.html) | `{ boundariesElement: 'body', gpuAcceleration: false }` | +| popper-options | parameters for [popper.js](https://popper.js.org/documentation.html) | object | please refer to [popper.js](https://popper.js.org/documentation.html) | `{ boundariesElement: 'body', gpuAcceleration: false }` | | popper-class | custom class name for popover | string | — | — | ### Slot diff --git a/examples/docs/en-US/tooltip.md b/examples/docs/en-US/tooltip.md index 24cdb5f4..43e00eaa 100644 --- a/examples/docs/en-US/tooltip.md +++ b/examples/docs/en-US/tooltip.md @@ -208,7 +208,7 @@ Disabled form elements are not supported in tooltip, see more information at [MD | offset | offset of the Tooltip | number | — | 0 | | transition | animation name | string | — | `fade-in-linear` | | visible-arrow | whether an arrow is displayed. For more information, check [Vue-popper](https://github.com/element-component/vue-popper) page | boolean | — | true | -| options | [popper.js](https://popper.js.org/documentation.html) parameters | Object | refer to [popper.js](https://popper.js.org/documentation.html) doc | `{ boundariesElement: 'body', gpuAcceleration: false }` | +| popper-options | [popper.js](https://popper.js.org/documentation.html) parameters | Object | refer to [popper.js](https://popper.js.org/documentation.html) doc | `{ boundariesElement: 'body', gpuAcceleration: false }` | | open-delay | delay of appearance, in millisecond | number | — | 0 | | manual | whether to control Tooltip manually. `mouseenter` and `mouseleave` won't have effects if set to `true` | boolean | — | false | | popper-class | custom class name for Tooltip's popper | string | — | — | diff --git a/examples/docs/zh-CN/popover.md b/examples/docs/zh-CN/popover.md index ba298e91..449c94e5 100644 --- a/examples/docs/zh-CN/popover.md +++ b/examples/docs/zh-CN/popover.md @@ -244,7 +244,7 @@ Popover 的属性与 Tooltip 很类似,它们都是基于`Vue-popper`开发的 | offset | 出现位置的偏移量 | Number | — | 0 | | transition | 定义渐变动画 | String | — | fade-in-linear | | 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 }` | +| popper-options | [popper.js](https://popper.js.org/documentation.html) 的参数 | Object | 参考 [popper.js](https://popper.js.org/documentation.html) 文档 | `{ boundariesElement: 'body', gpuAcceleration: false }` | | popper-class | 为 popper 添加类名 | String | — | — | ### Slot diff --git a/examples/docs/zh-CN/tooltip.md b/examples/docs/zh-CN/tooltip.md index 93422f6f..d2a479cb 100644 --- a/examples/docs/zh-CN/tooltip.md +++ b/examples/docs/zh-CN/tooltip.md @@ -210,7 +210,7 @@ tooltip 内不支持 disabled form 元素,参考[MDN](https://developer.mozill | offset | 出现位置的偏移量 | Number | — | 0 | | transition | 定义渐变动画 | String | — | `fade-in-linear` | | 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 } | +| popper-options | [popper.js](https://popper.js.org/documentation.html) 的参数 | Object | 参考 [popper.js](https://popper.js.org/documentation.html) 文档 | { boundariesElement: 'body', gpuAcceleration: false } | | open-delay | 延迟出现,单位毫秒 | Number | — | 0 | | manual | 手动控制模式,设置为 true 后,mouseenter 和 mouseleave 事件将不会生效 | Boolean | — | false | | popper-class | 为 Tooltip 的 popper 添加类名 | String | — | — | diff --git a/src/utils/vue-popper.js b/src/utils/vue-popper.js index caf67cbe..897c35f9 100644 --- a/src/utils/vue-popper.js +++ b/src/utils/vue-popper.js @@ -101,6 +101,9 @@ export default { this.resetTransformOrigin(); this.$nextTick(this.updatePopper); }); + if (typeof options.onUpdate === 'function') { + this.popperJS.onUpdate(options.onUpdate); + } this.popperJS._popper.style.zIndex = PopupManager.nextZIndex(); this.popperElm.addEventListener('click', stop); },