Skip to content

Commit 0c84db1

Browse files
authored
docs(dialog): 增加 lock-scroll 说明 (#3082)
1 parent 87f044d commit 0c84db1

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/packages/__VUE/dialog/doc.taro.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,30 @@ const verticalClick = () => {
107107

108108
:::
109109

110+
### lock-scroll
111+
112+
`lock-scroll` 属性,锁定背景,禁止滚动穿透,默认值为 `true`
113+
114+
```vue
115+
<template>
116+
<nut-dialog>
117+
<view>在该内容区域溢出时,无法滑动</view>
118+
</nut-dialog>
119+
</template>
120+
```
121+
122+
如果需要内容支持溢出滚动,则需要包裹一层 `scroll-view` 组件。
123+
124+
```vue
125+
<template>
126+
<nut-dialog>
127+
<scroll-view>
128+
<view>在该内容溢出时,则可以正常滑动</view>
129+
</scroll-view>
130+
</nut-dialog>
131+
</template>
132+
```
133+
110134
## API
111135

112136
### Props

0 commit comments

Comments
 (0)