Popup 弹出层

引入

在或index.json中引入组件,详细介绍见

基础用法

  1. <van-cell title="展示弹出层" is-link bind:click="showPopup" />

通过position属性设置弹出位置,默认居中弹出,可以设置为topbottomleftright

  1. <van-popup
  2. position="top"
  3. custom-style="height: 20%;"
  4. bind:close="onClose"
  5. />

关闭图标

圆角弹窗

设置round属性后,弹窗会根据弹出位置添加不同的圆角样式

<van-popup
  show="{{ show }}"
  round
  position="bottom"
  custom-style="height: 20%"
  bind:close="onClose"
/>

API

Events

外部样式类