docs(affix): fix listen-to

This commit is contained in:
07akioni 2020-10-23 15:09:21 +08:00
parent b9a11770c0
commit f0ac1d30c1
3 changed files with 3 additions and 3 deletions

View File

@ -9,7 +9,7 @@ position
|Name|Type|Default|Description|
|-|-|-|-|
|bottom|`number`|`undefined`|The css bottom property after trigger bottom affix. (if not set, use `offset-bottom` prop)|
|listen-to|`() => HTMLElement`|a function that returns the nearest scrollable ascendant element|The scrolling element to listen scrolling.|
|listen-to|`string \| HTMLElement`|`undefined`|The scrolling element to listen scrolling. If not set it will listen to the nearest scrollable ascendant element.|
|offset-bottom|`number`|`undefined`|The distance px to bottom of target to trigger bottom affix. (if not set, use `bottom` prop)|
|offset-top|`number`|`undefined`|The distance px to top of target to trigger top affix. (if not set, use `top` prop)|
|position|`'fixed' \| 'absolute'`|`'fixed'`||

View File

@ -9,7 +9,7 @@ position
|名称|类型|默认值|描述|
|-|-|-|-|
|bottom|`number`|`undefined`|在触发顶部固定后 Affix 的 CSS bottom 属性(如果没设定,会使用 `offset-bottom` 代替)|
|listen-to|`() => HTMLElement`|一个返回最邻近可滚动祖先元素的函数|需要监听滚动的元素|
|listen-to|`string \| HTMLElement`|`undefined`|需要监听滚动的元素,如果未设定则会监听最近的可滚动祖先元素|
|offset-bottom|`number`|`undefined`|触发底部固定时Affix 和目标元素元素的底部距离(如果没设定,会使用 `bottom` 代替)|
|offset-top|`number`|`undefined`|触发顶部固定时Affix 和目标元素元素的顶部距离(如果没设定,会使用 `top` 代替)|
|position|`'fixed' \| 'absolute'`|`'fixed'`||

View File

@ -26,7 +26,7 @@ export default {
props: {
listenTo: {
type: [String, Object],
default: null
default: undefined
},
offsetTop: {
type: Number,