通知栏 NoticeBar
展示 · 展示组件
重要通知横幅
按需导入
wbbb-ui/components/notice-bar基础用法
示例代码
<script setup lang="ts">
import { WbbbNoticeBar } from 'wbbb-ui/components/notice-bar'
import 'wbbb-ui/styles/notice-bar'
</script>
<template>
<WbbbNoticeBar />
</template>真实移动端预览新窗口打开 ↗
状态与交互
以下状态均可在右侧的真实 Playground 中操作与验收。
默认主色成功警告危险信息
API 参考
属性(Props)
| 属性 | 说明 | 类型 | 默认值 | 必填 |
|---|---|---|---|---|
closeable | 是否允许用户关闭弹层或通知。 | boolean | false | 否 |
color | 设置主要显示颜色。 | string | '' | 否 |
text | 提供主要展示文案。 | string | '' | 否 |
type | 设置组件的语义类型或样式变体。 | WbbbStatus \| 'primary' | 'warning' | 否 |
事件(Events)
close
插槽(Slots)
default
双向绑定
不支持 v-model。
平台说明
构建验证:H5、App Vue、微信小程序、支付宝小程序与抖音小程序。
运行时差异:H5 支持键盘焦点与减弱动效;小程序端使用等价触控交互。上传、日期选择和服务弹层应在目标端再次验收。
使用提示:更多状态组合和跨端表现请在 Playground 中验证。
