feat(Popup): add closeable prop (#4362)

This commit is contained in:
neverland
2019-09-04 17:58:34 +08:00
committed by GitHub
parent 0bd3997373
commit e64beee5b0
7 changed files with 92 additions and 115 deletions
+15 -1
View File
@@ -55,6 +55,19 @@ export default {
/>
```
### 关闭图标
设置`closeable`属性后,会在弹出层的右上角显示关闭图标
```html
<van-popup
v-model="show"
closeable
position="bottom"
:style="{ height: '20%' }"
/>
```
### 圆角弹窗
设置`round`属性后,弹窗会根据弹出位置添加不同的圆角样式
@@ -119,7 +132,8 @@ export default {
| lock-scroll | 是否锁定背景滚动 | *boolean* | `true` | - |
| lazy-render | 是否在显示弹层时才渲染节点 | *boolean* | `true` | - |
| close-on-click-overlay | 是否在点击遮罩层后关闭 | *boolean* | `true` | - |
| transition | 动画类名,用法与 Vue 内置的`transtion`组件的`name`属性一致 | *string* | - | - |
| closeable | 是否显示关闭图标 | *boolean* | `false` | 2.2.0 |
| transition | 动画类名,用法与 Vue 原生`transtion`组件的`name`属性一致 | *string* | - | - |
| get-container | 指定挂载的节点,可以传入选择器,<br>或一个返回节点的函数 | *string \| () => HTMLElement* | - | - |
### Events