Popup 弹出层
Feedback · Interactive component
Positioned popup layers.
On-demand import
wbbb-ui/components/popupBasic Usage
<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>States and Interaction
All listed states can be operated and verified in the live Playground preview.
DefaultPressed选中Disabled
API Reference
Props
| Property | Description | Type | Default | Required |
|---|---|---|---|---|
closeOnClickOverlay | Closes the overlay when its backdrop is pressed. | boolean | true | No |
modelValue | Provides the current value used by v-model. | boolean | false | No |
placement | Sets where the overlay or pop-up is positioned. | WbbbPlacement | 'center' | No |
round | Uses fully rounded corners or a pill shape. | boolean | false | No |
zIndex | Sets the stacking order of the component. | number | 900 | No |
Events
update:modelValuecloseopen
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.
