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