From faa7b6d14aa1c840ab4e7a001d925ec37693fb70 Mon Sep 17 00:00:00 2001 From: Jake Date: Mon, 6 May 2019 09:41:26 +0800 Subject: [PATCH] [new feature] NoticeBar: left-icon prop support icon name (#1604) --- packages/notice-bar/README.md | 2 +- packages/notice-bar/index.less | 5 +++-- packages/notice-bar/index.wxml | 6 ++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/notice-bar/README.md b/packages/notice-bar/README.md index 8fdb265e..0dfadeff 100644 --- a/packages/notice-bar/README.md +++ b/packages/notice-bar/README.md @@ -65,7 +65,7 @@ es5 | delay | 动画延迟时间 (s) | `Number` | `1` | | speed | 滚动速率 (px/s) | `Number` | `50` | | scrollable | 是否在长度溢出时滚动播放 | `Boolean` | `true` | -| left-icon | 左侧图标图片 URL | `String` | - | +| left-icon | 左侧图标名称或图片链接,可选值见 Icon 组件 | `String` | - | | color | 文本颜色 | `String` | `#ed6a0c` | | backgroundColor | 滚动条背景 | `String` | `#fffbe8` | | open-type | 微信开放能力 | `String` | `navigate` | diff --git a/packages/notice-bar/index.less b/packages/notice-bar/index.less index 1aac11fd..d7b1699e 100644 --- a/packages/notice-bar/index.less +++ b/packages/notice-bar/index.less @@ -12,9 +12,10 @@ } &__left-icon { - width: 16px; - height: 16px; margin-right: 4px; + vertical-align: middle; + display: flex; + align-items: center; } &__right-icon { diff --git a/packages/notice-bar/index.wxml b/packages/notice-bar/index.wxml index 85a60b1d..c763a4d4 100644 --- a/packages/notice-bar/index.wxml +++ b/packages/notice-bar/index.wxml @@ -4,11 +4,13 @@ style="color: {{ color }}; background-color: {{ backgroundColor }};" bind:tap="onClick" > - + {{ text }}