Skip to content

Popup 弹出层 ​

Feedback · Interactive component

Positioned popup layers.

On-demand importwbbb-ui/components/popup

Basic Usage ​

Example code
<script setup lang="ts">
import { ref } from 'vue'
import { WbbbPopup } from 'wbbb-ui/components/popup'
import 'wbbb-ui/styles/popup'

const value = ref('')
</script>

<template>
  <WbbbPopup v-model="value" />
</template>
Live mobile previewOpen in a new tab ↗

States and Interaction ​

All listed states can be operated and verified in the live Playground preview.

DefaultPressed选中Disabled

API Reference ​

Props

PropertyDescriptionTypeDefaultRequired
closeOnClickOverlayCloses the overlay when its backdrop is pressed.booleantrueNo
modelValueProvides the current value used by v-model.booleanfalseNo
placementSets where the overlay or pop-up is positioned.WbbbPlacement'center'No
roundUses fully rounded corners or a pill shape.booleanfalseNo
zIndexSets the stacking order of the component.number900No

Events

  • update:modelValue
  • close
  • open

Slots

  • default

Two-way binding

Supports v-model (modelValue).

Platform Notes ​

Build verification: H5, App Vue, WeChat Mini Program, Alipay Mini Program, and Douyin Mini Program.

Runtime differences: H5 supports keyboard focus and reduced motion. Mini Programs provide equivalent touch interaction; verify upload, date selection, and overlays on target platforms.

Usage note: Use Playground to verify further state combinations and cross-platform behavior.

Wbbb UI · Built for uni-app product experiences