Popup 弹出层
引入
在或index.json
中引入组件,详细介绍见
基础用法
<van-cell title="展示弹出层" is-link bind:click="showPopup" />
通过position
属性设置弹出位置,默认居中弹出,可以设置为top
、bottom
、left
、right
<van-popup
position="top"
custom-style="height: 20%;"
bind:close="onClose"
/>
关闭图标
圆角弹窗
设置round
属性后,弹窗会根据弹出位置添加不同的圆角样式
<van-popup
show="{{ show }}"
round
position="bottom"
custom-style="height: 20%"
bind:close="onClose"
/>