[improvement] ActionSheet: add z-index prop (#610)

This commit is contained in:
neverland 2018-09-20 15:10:10 +08:00 committed by GitHub
parent 4b59ae9424
commit 6dceff823e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 0 deletions

View File

@ -88,6 +88,7 @@ Page({
|-----------|-----------|-----------|-------------| |-----------|-----------|-----------|-------------|
| actions | 菜单选项 | `Array` | `[]` | | actions | 菜单选项 | `Array` | `[]` |
| title | 标题 | `String` | - | | title | 标题 | `String` | - |
| z-index | z-index 层级 | `Number` | `100` |
| cancel-text | 取消按钮文字 | `String` | - | | cancel-text | 取消按钮文字 | `String` | - |
| overlay | 是否显示遮罩层 | `Boolean` | - | | overlay | 是否显示遮罩层 | `Boolean` | - |
| close-on-click-overlay | 点击遮罩是否关闭菜单 | `Boolean` | - | | close-on-click-overlay | 点击遮罩是否关闭菜单 | `Boolean` | - |

View File

@ -5,6 +5,10 @@ create({
show: Boolean, show: Boolean,
title: String, title: String,
cancelText: String, cancelText: String,
zIndex: {
type: Number,
value: 100
},
actions: { actions: {
type: Array, type: Array,
value: [] value: []

View File

@ -1,6 +1,7 @@
<van-popup <van-popup
show="{{ show }}" show="{{ show }}"
position="bottom" position="bottom"
z-index="{{ zIndex }}"
overlay="{{ overlay }}" overlay="{{ overlay }}"
custom-class="van-action-sheet" custom-class="van-action-sheet"
close-on-click-overlay="{{ closeOnClickOverlay }}" close-on-click-overlay="{{ closeOnClickOverlay }}"