feat(Popup): add close-icon-position prop (#4507)

This commit is contained in:
neverland
2019-09-19 17:14:14 +08:00
committed by GitHub
parent 68da81a51a
commit 971b218873
18 changed files with 139 additions and 58 deletions
+12 -4
View File
@@ -14,9 +14,7 @@ Vue.use(Popup);
### Basic Usage
```html
<van-button type="primary" @click="showPopup">
Show Popup
</van-button>
<van-cell is-link @click="showPopup">Show Popup</van-cell>
<van-popup v-model="show">Content</van-popup>
```
@@ -67,6 +65,15 @@ Use `position` prop to set popup display position
position="bottom"
:style="{ height: '20%' }"
/>
<!-- Icon Position -->
<van-popup
v-model="show"
closeable
close-icon-position="top-left"
position="bottom"
:style="{ height: '20%' }"
/>
```
### Round Corner
@@ -132,8 +139,9 @@ export default {
| close-on-click-overlay | Whether to close when click overlay | *boolean* | `true` | - |
| 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` | - |
| get-container | Return the mount node for Popup | *string \| () => HTMLElement* | - | - |
| 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 |
### Events