# NoticeBar 通告栏
### 引入
在`app.json`或`index.json`中引入组件,默认为`ES6`版本,`ES5`引入方式参见[快速上手](#/quickstart)
```json
"usingComponents": {
"van-notice-bar": "path/to/vant-weapp/dist/notice-bar/index"
}
```
## 代码演示
### 基础用法
```html
```
### 禁用滚动
文字内容多于一行时,可通过`scrollable`参数控制是否开启滚动
```html
```
### 通告栏模式
默认模式为空,支持`closeable`和`link`。
```html
```
## API
### Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------|-------------|
| mode | 通告栏模式,可选值为 `closeable` `link` | *string* | `''` | - |
| delay | 动画延迟时间 (s) | *number* | `1` | - |
| speed | 滚动速率 (px/s) | *number* | `50` | - |
| scrollable | 是否在长度溢出时滚动播放 | *boolean* | `true` | - |
| left-icon | 左侧图标名称或图片链接,可选值见 Icon 组件 | *string* | - | - |
| color | 文本颜色 | *string* | `#ed6a0c` | - |
| backgroundColor | 滚动条背景 | *string* | `#fffbe8` | - |
| open-type | 微信开放能力 | *string* | `navigate` | - |
### Events
| 事件名 | 说明 | 参数 |
|-----------|-----------|-----------|
| bind:click | 点击事件回调 | - |
### 外部样式类
| 类名 | 说明 |
|-----------|-----------|
| custom-class | 根节点样式类 |