diff --git a/example/pages/notice-bar/index.wxml b/example/pages/notice-bar/index.wxml index 61ab75df..17f86774 100644 --- a/example/pages/notice-bar/index.wxml +++ b/example/pages/notice-bar/index.wxml @@ -14,6 +14,13 @@ - + + + + + [公告] + [结束] + + \ No newline at end of file diff --git a/packages/notice-bar/README.md b/packages/notice-bar/README.md index a206e194..93532cb3 100644 --- a/packages/notice-bar/README.md +++ b/packages/notice-bar/README.md @@ -31,6 +31,27 @@ /> ``` +### 多行展示 +禁用滚动时,可以设置`wrapable`来开启多行展示 + +```html + +``` + +### 使用左右插槽 +使用`left-icon`插槽和`right-icon`插槽自定义左右固定内容 + +```html + + [公告] + [结束] + +``` + ### 通告栏模式 默认模式为空,支持`closeable`和`link`。 @@ -69,6 +90,13 @@ |-----------|-----------|-----------| | bind:click | 点击事件回调 | - | +### Slot + +| 名称 | 说明 | +|-----------|-----------| +| left-icon | 自定义左侧固定内容 | +| right-icon | 自定义右侧固定内容 | + ### 外部样式类 | 类名 | 说明 | diff --git a/packages/notice-bar/index.wxml b/packages/notice-bar/index.wxml index 034ce6fe..38b7bc00 100644 --- a/packages/notice-bar/index.wxml +++ b/packages/notice-bar/index.wxml @@ -12,6 +12,7 @@ name="{{ leftIcon }}" class="van-notice-bar__left-icon" /> + @@ -26,10 +27,11 @@ bind:tap="onClickIcon" /> +