NoticeBar 通知栏 #
基本使用 #
template
<c-notice-bar text="重要通知重要通知重要通知" autoplay />
API #
NoticeBar Props #
| 名称 | 类型 | 默认值 | 版本 | 说明 |
|---|---|---|---|---|
| c | string | default | 配置名。使用说明 | |
| props | NoticeBarProps | undefined | 全部 props 。 使用说明 | |
| c-class | HTMLAttributes['class'] | undefined | 自定义类名 | |
| c-style | HTMLAttributes['style'] | undefined | 自定义样式 | |
| color | string | undefined | 背景颜色。 使用说明 | |
| left-icon | string | undefined | 左边图标 | |
| left-icon-props | IconProps | undefined | IconProps | |
| right-icon | string | undefined | 右边图标 | |
| right-icon-props | IconProps | undefined | IconProps | |
| text | string | undefined | 文字 | |
| text-props | TextProps | undefined | TextProps | |
| autoplay | boolean | undefined | 是否自动播放 | |
| speed | string | number | undefined | 滚动速率 (px/s) | |
| closable | boolean | undefined | 是否可关闭 | |
| close-icon-props | IconProps | undefined | IconProps |
Button Events #
| 名称 | 参数 | 说明 |
|---|---|---|
| click | () => void | 点击时触发 |
| close | () => void | 关闭时触发 |