From 34c880f8d0c6c431b8d21276035ba33295164d48 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Sat, 10 Nov 2018 22:35:03 +0800 Subject: [PATCH] feat: tooltip add align #252 --- components/tooltip/abstractTooltipProps.js | 1 + components/tooltip/index.en-US.md | 1 + components/tooltip/index.zh-CN.md | 1 + 3 files changed, 3 insertions(+) diff --git a/components/tooltip/abstractTooltipProps.js b/components/tooltip/abstractTooltipProps.js index eea9e1598..a963cf614 100644 --- a/components/tooltip/abstractTooltipProps.js +++ b/components/tooltip/abstractTooltipProps.js @@ -17,4 +17,5 @@ export default () => ({ getPopupContainer: PropTypes.func, arrowPointAtCenter: PropTypes.bool.def(false), autoAdjustOverflow: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]).def(true), + align: PropTypes.object.def({}), }) diff --git a/components/tooltip/index.en-US.md b/components/tooltip/index.en-US.md index 19dd24800..0ff307e77 100644 --- a/components/tooltip/index.en-US.md +++ b/components/tooltip/index.en-US.md @@ -21,6 +21,7 @@ The following APIs are shared by Tooltip, Popconfirm, Popover. | placement | The position of the tooltip relative to the target, which can be one of `top` `left` `right` `bottom` `topLeft` `topRight` `bottomLeft` `bottomRight` `leftTop` `leftBottom` `rightTop` `rightBottom` | string | `top` | | trigger | Tooltip trigger mode | `hover` \| `focus` \| `click` \| `contextmenu` | `hover` | | visible(v-model) | Whether the floating tooltip card is visible or not | boolean | `false` | +| align | this value will be merged into placement's config, please refer to the settings [dom-align](https://github.com/yiminghe/dom-align) | Object | - | ### events | Events Name | Description | Arguments | diff --git a/components/tooltip/index.zh-CN.md b/components/tooltip/index.zh-CN.md index 0a1e738cc..6e2f6ca2b 100644 --- a/components/tooltip/index.zh-CN.md +++ b/components/tooltip/index.zh-CN.md @@ -21,6 +21,7 @@ | placement | 气泡框位置,可选 `top` `left` `right` `bottom` `topLeft` `topRight` `bottomLeft` `bottomRight` `leftTop` `leftBottom` `rightTop` `rightBottom` | string | top | | trigger | 触发行为,可选 `hover/focus/click/contextmenu` | string | hover | | visible(v-model) | 用于手动控制浮层显隐 | boolean | false | +| align | 该值将合并到 placement 的配置中,设置参考 [dom-align](https://github.com/yiminghe/dom-align) | Object | 无 | ### 事件 | 事件名称 | 说明 | 回调参数 |