docs(Popup): add transition component link (#4635)

This commit is contained in:
neverland 2019-09-30 11:16:42 +08:00 committed by GitHub
parent c4713ad0c2
commit 8493fda8b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 26 deletions

View File

@ -93,22 +93,13 @@ Use `get-container` prop to specify mount location
```html
<!-- mount to body -->
<van-popup
v-model="show"
get-container="body"
/>
<van-popup v-model="show" get-container="body" />
<!-- mount to #app -->
<van-popup
v-model="show"
get-container="#app"
/>
<van-popup v-model="show" get-container="#app" />
<!-- Specify the mount location by function -->
<van-popup
v-model="show"
:get-container="getContainer"
/>
<van-popup v-model="show" :get-container="getContainer" />
```
```js
@ -140,7 +131,7 @@ export default {
| closeable | Whether to show close icon | *boolean* | `false` | 2.2.0 |
| close-icon | Close icon name | *string* | `cross` | 2.2.0 |
| close-icon-position | Close Icon Positioncan be set to `top-left` `bottom-left` `bottom-right` | *string* | `top-right` | 2.2.2 |
| transition | Transition | *string* | `popup-slide` | - |
| transition | Transition, equivalent to `name` prop of [transtion](https://vuejs.org/v2/api/#transition) | *string* | - | - |
| get-container | Return the mount node for Popup | *string \| () => Element* | - | - |
| safe-area-inset-bottom | Whether to enable bottom safe area adaptation | *boolean* | `false` | 2.2.1 |

View File

@ -103,22 +103,13 @@ export default {
```html
<!-- 挂载到 body 节点下 -->
<van-popup
v-model="show"
get-container="body"
/>
<van-popup v-model="show" get-container="body" />
<!-- 挂载到 #app 节点下 -->
<van-popup
v-model="show"
get-container="#app"
/>
<van-popup v-model="show" get-container="#app" />
<!-- 通过函数指定挂载位置 -->
<van-popup
v-model="show"
:get-container="getContainer"
/>
<van-popup v-model="show" :get-container="getContainer" />
```
```js
@ -151,7 +142,7 @@ export default {
| closeable | 是否显示关闭图标 | *boolean* | `false` | 2.2.0 |
| close-icon | 关闭图标名称或图片链接 | *string* | `cross` | 2.2.0 |
| close-icon-position | 关闭图标位置,可选值为`top-left` `bottom-left` `bottom-right` | *string* | `top-right` | 2.2.2 |
| transition | 动画类名,用法与 Vue 原生`transtion`组件的`name`属性一致 | *string* | - | - |
| transition | 动画类名,等价于 [transtion](https://cn.vuejs.org/v2/api/index.html#transition) 的`name`属性 | *string* | - | - |
| get-container | 指定挂载的节点,可以传入选择器,<br>或一个返回节点的函数 | *string \| () => Element* | - | - |
| safe-area-inset-bottom | 是否开启底部安全区适配,[详细说明](#/zh-CN/quickstart#di-bu-an-quan-qu-gua-pei) | *boolean* | `false` | 2.2.1 |