mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 02:31:21 +00:00
[new feature] Notice bar support more props (#254)
* [bugfix] CouponList always show empty info * [bugfix] add click feedback of buttons in components * [Doc] add custom theme document * [new feature] Notice bar support more props * [bugfix] PullRefresh test cases * [bugfix] unused NoticeBar style
This commit is contained in:
@@ -13,7 +13,10 @@ Vue.component(NoticeBar.name, NoticeBar);
|
||||
|
||||
:::demo Basic Usage
|
||||
```html
|
||||
<van-notice-bar text="Only those who have the patience to do simple things perfectly ever acquire the skill to do difficult things easily." />
|
||||
<van-notice-bar
|
||||
text="Only those who have the patience to do simple things perfectly ever acquire the skill to do difficult things easily."
|
||||
left-icon="//img.yzcdn.cn/public_files/2017/8/10/6af5b7168eed548100d9041f07b7c616.png"
|
||||
/>
|
||||
```
|
||||
:::
|
||||
|
||||
@@ -47,8 +50,12 @@ Vue.component(NoticeBar.name, NoticeBar);
|
||||
|-----------|-----------|-----------|-------------|-------------|
|
||||
| mode | Mode | String | `''` | `closeable` `link` |
|
||||
| delay | Animation delay (s) | Number | `1` | - |
|
||||
| speed | Scroll speed (px) | Number | `40` | - |
|
||||
| speed | Scroll speed (px) | Number | `50` | - |
|
||||
| scrollable | Whether to scroll content | Boolean | `true` | - |
|
||||
| leftIcon | Image url of left icon | String | - | - |
|
||||
| color | Text color | String | `#f60` | - |
|
||||
| background | Background color | String | `#fff7cc` | - |
|
||||
|
||||
|
||||
### Event
|
||||
|
||||
|
@@ -21,7 +21,10 @@ Vue.component(NoticeBar.name, NoticeBar);
|
||||
|
||||
:::demo 基础用法
|
||||
```html
|
||||
<van-notice-bar text="足协杯战线连续第2年上演广州德比战,上赛季半决赛上恒大以两回合5-3的总比分淘汰富力。" />
|
||||
<van-notice-bar
|
||||
text="足协杯战线连续第2年上演广州德比战,上赛季半决赛上恒大以两回合5-3的总比分淘汰富力。"
|
||||
left-icon="//img.yzcdn.cn/public_files/2017/8/10/6af5b7168eed548100d9041f07b7c616.png"
|
||||
/>
|
||||
```
|
||||
:::
|
||||
|
||||
@@ -59,8 +62,11 @@ Vue.component(NoticeBar.name, NoticeBar);
|
||||
|-----------|-----------|-----------|-------------|-------------|
|
||||
| mode | 通告栏模式 | String | `''` | `closeable` `link` |
|
||||
| delay | 动画延迟时间,单位秒 | Number | `1` | - |
|
||||
| speed | 滚动速率,单位px | Number | `40` | - |
|
||||
| speed | 滚动速率,单位px | Number | `50` | - |
|
||||
| scrollable | 是否滚动 | Boolean | `true` | - |
|
||||
| leftIcon | 左侧图标图片链接 | String | - | - |
|
||||
| color | 文本颜色 | String | `#f60` | - |
|
||||
| background | 滚动条背景 | String | `#fff7cc` | - |
|
||||
|
||||
### Event
|
||||
|
||||
|
Reference in New Issue
Block a user