Skip to content

BottomPopup

基础用法

html

<pa-cell-group inset>
  <pa-cell title="基础用法" is-link @click="visible = true" />
</pa-cell-group>

<pa-bottom-popup v-model:show="visible" title="标题">
  <view class="px-20">{{ text }}</view>
</pa-bottom-popup>
ts

import { computed, ref } from 'vue'

const visible = ref<boolean>(false)

const text = computed(() => {
  return new Array(100)
    .fill(0)
    .map(() => '内容')
    .join('')
})

自定义底部

html

<pa-cell-group inset>
  <pa-cell title="自定义底部" is-link @click="visible = true" />
</pa-cell-group>

<pa-bottom-popup v-model:show="visible" title="标题">
  <view class="px-20">{{ text }}</view>
  <template #footer>
    <view class="flex justify-around px-26">
      <pa-button type="default" block style="width: 50%">取消</pa-button>
      <pa-button class="ml-15" block style="width: 50%">确定</pa-button>
    </view>
  </template>
</pa-bottom-popup>
ts

import { computed, ref } from 'vue'

const visible = ref<boolean>(false)

const text = computed(() => {
  return new Array(100)
    .fill(0)
    .map(() => '内容')
    .join('')
})

BottomPopup Props

参数说明类型默认值
show是否显示booleanfalse
zIndexz-index层级number999
overlay是否显示遮罩booleantrue
bgColor背景色CSSProperties['background-color']-
safeAreaInsetBottom是否适配底部安全区booleantrue
title标题string-
height弹窗高度string'80vh'
round是否圆角(boolean | string)[]true
closeable是否显示关闭按钮booleantrue
closeOnClickOverlay点击遮罩是否关闭弹窗booleantrue
duration动画的执行时间,单位msstring | number300

BottomPopup Event

事件名参数
update:show(value: PopupProps['show'])
open()
opened()
close()
closed()
clickOverlay()

BottomPopup Slot

名称说明
before-title-
after-title-
default-
footer-

样式变量

🙈