mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-09 04:31:35 +08:00
docs(affix): fix listen-to
This commit is contained in:
parent
b9a11770c0
commit
f0ac1d30c1
@ -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'`||
|
||||
|
@ -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'`||
|
||||
|
@ -26,7 +26,7 @@ export default {
|
||||
props: {
|
||||
listenTo: {
|
||||
type: [String, Object],
|
||||
default: null
|
||||
default: undefined
|
||||
},
|
||||
offsetTop: {
|
||||
type: Number,
|
||||
|
Loading…
Reference in New Issue
Block a user