diff --git a/components/affix/index.en-US.md b/components/affix/index.en-US.md index 202962a706..613a1a1d91 100644 --- a/components/affix/index.en-US.md +++ b/components/affix/index.en-US.md @@ -18,6 +18,7 @@ Please note that Affix should not cover other content on the page, especially wh |--------------|-----------------------|----------|--------------| | offsetTop | Pixels to offset from top when calculating position of scroll | number | 0 | | offsetBottom | Pixels to offset from bottom when calculating position of scroll | number | - | +| target | specifies the scrollable area dom node | () => HTMLElement | () => window | | onChange | Callback when affix state is changed | Function(affixed) | - | **Note:** Children of `Affix` can not be `position: absolute`, but you can set `Affix` as `position: absolute`: diff --git a/components/affix/index.zh-CN.md b/components/affix/index.zh-CN.md index 7c1582c9a9..59ad33ac60 100644 --- a/components/affix/index.zh-CN.md +++ b/components/affix/index.zh-CN.md @@ -19,7 +19,7 @@ title: Affix |-------------|----------------|--------------------|--------------| | offsetTop | 距离窗口顶部达到指定偏移量后触发 | number | | | offsetBottom | 距离窗口底部达到指定偏移量后触发 | number | | -| target | 设置 `Affix` 需要监听其滚动事件的元素,值为一个返回对应 DOM 元素的函数 | Function | () => window | +| target | 设置 `Affix` 需要监听其滚动事件的元素,值为一个返回对应 DOM 元素的函数 | () => HTMLElement | () => window | | onChange | 固定状态改变时触发的回调函数 | Function(affixed) | 无 | **注意:**`Affix` 内的元素不要使用绝对定位,如需要绝对定位的效果,可以直接设置 `Affix` 为绝对定位: diff --git a/components/back-top/index.en-US.md b/components/back-top/index.en-US.md index 9d3874d171..30ba06b07a 100644 --- a/components/back-top/index.en-US.md +++ b/components/back-top/index.en-US.md @@ -22,4 +22,4 @@ Property | Description | Type | Default -----|-----|-----|------ visibilityHeight | the `BackTop` button will not show until the scroll height reaches this value | number | 400 onClick | a callback function, which can be executed when you click the button | Function | - - +target | specifies the scrollable area dom node | () => HTMLElement | () => window diff --git a/components/back-top/index.zh-CN.md b/components/back-top/index.zh-CN.md index 2d227ca44f..3ad518b334 100644 --- a/components/back-top/index.zh-CN.md +++ b/components/back-top/index.zh-CN.md @@ -22,3 +22,4 @@ title: BackTop |-------------|----------------|--------------------|--------------| | visibilityHeight | 滚动高度达到此参数值才出现 `BackTop` | number | 400 | | onClick | 点击按钮的回调函数 | Function | - | +| target | 设置需要监听其滚动事件的元素,值为一个返回对应 DOM 元素的函数 | Function | () => window |