mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-05 19:41:45 +08:00
feat(ActionSheet): add round prop (#2080)
This commit is contained in:
parent
cdd65163d1
commit
086a5f9ff6
@ -7,24 +7,13 @@ Page({
|
||||
show3: false,
|
||||
show4: false,
|
||||
action1: [
|
||||
{
|
||||
name: '选项'
|
||||
},
|
||||
{
|
||||
name: '选项'
|
||||
},
|
||||
{
|
||||
name: '选项',
|
||||
subname: '描述信息'
|
||||
}
|
||||
{ name: '选项' },
|
||||
{ name: '选项' },
|
||||
{ name: '选项', subname: '描述信息' }
|
||||
],
|
||||
action2: [
|
||||
{
|
||||
name: '选项'
|
||||
},
|
||||
{
|
||||
loading: true
|
||||
},
|
||||
{ name: '选项', color: '#07c160' },
|
||||
{ loading: true },
|
||||
{ name: '禁用选项', disabled: true }
|
||||
]
|
||||
},
|
||||
@ -49,5 +38,5 @@ Page({
|
||||
|
||||
toggleActionSheet4() {
|
||||
this.toggle('show4');
|
||||
},
|
||||
}
|
||||
});
|
||||
|
@ -1,5 +1,5 @@
|
||||
<demo-block title="基础用法" padding>
|
||||
<van-button bind:click="toggleActionSheet1">弹出菜单</van-button>
|
||||
<van-button type="primary" bind:click="toggleActionSheet1">弹出菜单</van-button>
|
||||
<van-action-sheet
|
||||
show="{{ show1 }}"
|
||||
actions="{{ action1 }}"
|
||||
@ -9,11 +9,10 @@
|
||||
</demo-block>
|
||||
|
||||
<demo-block title="选项状态" padding>
|
||||
<van-button bind:click="toggleActionSheet2">弹出菜单</van-button>
|
||||
<van-button type="primary" bind:click="toggleActionSheet2">弹出菜单</van-button>
|
||||
<van-action-sheet
|
||||
show="{{ show2 }}"
|
||||
actions="{{ action2 }}"
|
||||
cancel-text="取消"
|
||||
bind:close="toggleActionSheet2"
|
||||
bind:cancel="toggleActionSheet2"
|
||||
bind:select="toggleActionSheet2"
|
||||
@ -21,7 +20,7 @@
|
||||
</demo-block>
|
||||
|
||||
<demo-block title="展示取消按钮" padding>
|
||||
<van-button bind:click="toggleActionSheet3">弹出菜单</van-button>
|
||||
<van-button type="primary" bind:click="toggleActionSheet3">弹出菜单</van-button>
|
||||
<van-action-sheet
|
||||
show="{{ show3 }}"
|
||||
actions="{{ action1 }}"
|
||||
@ -32,7 +31,7 @@
|
||||
</demo-block>
|
||||
|
||||
<demo-block title="展示标题栏" padding>
|
||||
<van-button bind:click="toggleActionSheet4">弹出菜单</van-button>
|
||||
<van-button type="primary" bind:click="toggleActionSheet4">弹出菜单</van-button>
|
||||
<van-action-sheet
|
||||
show="{{ show4 }}"
|
||||
title="标题"
|
||||
|
@ -110,6 +110,7 @@ Page({
|
||||
| title | 标题 | *string* | - | - |
|
||||
| z-index | z-index 层级 | *number* | `100` | - |
|
||||
| cancel-text | 取消按钮文字 | *string* | - | - |
|
||||
| round | 是否显示圆角 | *boolean* | `true` | 1.0.0 |
|
||||
| overlay | 是否显示遮罩层 | *boolean* | - | - |
|
||||
| close-on-click-overlay | 点击遮罩是否关闭菜单 | *boolean* | - | - |
|
||||
| close-on-click-action | 是否在点击选项后关闭 | *boolean* | `true` | - |
|
||||
|
@ -9,6 +9,10 @@ VantComponent({
|
||||
show: Boolean,
|
||||
title: String,
|
||||
cancelText: String,
|
||||
round: {
|
||||
type: Boolean,
|
||||
value: true
|
||||
},
|
||||
zIndex: {
|
||||
type: Number,
|
||||
value: 100
|
||||
|
@ -3,6 +3,7 @@
|
||||
<van-popup
|
||||
show="{{ show }}"
|
||||
position="bottom"
|
||||
round="{{ round }}"
|
||||
z-index="{{ zIndex }}"
|
||||
overlay="{{ overlay }}"
|
||||
custom-class="van-action-sheet"
|
||||
|
Loading…
x
Reference in New Issue
Block a user