From cdd65163d17e562ad1fa5ed7981f691ee88f2b2c Mon Sep 17 00:00:00 2001 From: ShuaiKang Zhang Date: Fri, 20 Sep 2019 16:17:13 +0800 Subject: [PATCH] feat(GoodsActionIcon): add dot prop (#2072) --- example/pages/goods-action/index.wxml | 4 ++-- packages/goods-action-icon/index.ts | 1 + packages/goods-action-icon/index.wxml | 1 + packages/goods-action/README.md | 6 +++--- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/example/pages/goods-action/index.wxml b/example/pages/goods-action/index.wxml index c1575e7d..d9f4eca8 100644 --- a/example/pages/goods-action/index.wxml +++ b/example/pages/goods-action/index.wxml @@ -22,9 +22,9 @@ - + - + diff --git a/packages/goods-action-icon/index.ts b/packages/goods-action-icon/index.ts index 30d13fd6..d0c9e11c 100644 --- a/packages/goods-action-icon/index.ts +++ b/packages/goods-action-icon/index.ts @@ -11,6 +11,7 @@ VantComponent({ props: { text: String, + dot: Boolean, info: String, icon: String, disabled: Boolean, diff --git a/packages/goods-action-icon/index.wxml b/packages/goods-action-icon/index.wxml index 2b9b2b1c..a3972b22 100644 --- a/packages/goods-action-icon/index.wxml +++ b/packages/goods-action-icon/index.wxml @@ -27,6 +27,7 @@ wx:if="{{ icon }}" size="20px" name="{{ icon }}" + dot="{{ dot }}" info="{{ info }}" class="van-goods-action-icon__icon" custom-class="icon-class" diff --git a/packages/goods-action/README.md b/packages/goods-action/README.md index 2052b45f..d46e5a31 100644 --- a/packages/goods-action/README.md +++ b/packages/goods-action/README.md @@ -52,13 +52,13 @@ Page({ }); ``` -### 图标提示 +### 提示信息 -通过`info`属性在图标右上角增加相应的提示 +设置`dot`属性后,会在图标右上角展示一个小红点。设置`info`属性后,会在图标右上角展示相应的徽标 ```html - +