From da30b612c4d4632951fa1f9cf840b6423233ea2d Mon Sep 17 00:00:00 2001 From: ShuaiKang Zhang Date: Thu, 19 Sep 2019 20:05:38 +0800 Subject: [PATCH] feat(SideBarItem): add dot prop (#2066) --- example/pages/sidebar/index.wxml | 4 ++-- packages/sidebar-item/index.ts | 1 + packages/sidebar-item/index.wxml | 3 ++- packages/sidebar/README.md | 9 +++++---- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/example/pages/sidebar/index.wxml b/example/pages/sidebar/index.wxml index abb3e713..c1e90a54 100644 --- a/example/pages/sidebar/index.wxml +++ b/example/pages/sidebar/index.wxml @@ -8,8 +8,8 @@ - - + + diff --git a/packages/sidebar-item/index.ts b/packages/sidebar-item/index.ts index 701c6842..0d5a0b98 100644 --- a/packages/sidebar-item/index.ts +++ b/packages/sidebar-item/index.ts @@ -10,6 +10,7 @@ VantComponent({ }, props: { + dot: Boolean, info: null, title: String }, diff --git a/packages/sidebar-item/index.wxml b/packages/sidebar-item/index.wxml index ba5c2af7..6ae8d538 100644 --- a/packages/sidebar-item/index.wxml +++ b/packages/sidebar-item/index.wxml @@ -8,7 +8,8 @@ > diff --git a/packages/sidebar/README.md b/packages/sidebar/README.md index 57c49ed4..8a73fe7a 100644 --- a/packages/sidebar/README.md +++ b/packages/sidebar/README.md @@ -40,14 +40,14 @@ Page({ }); ``` -### 显示徽标 +### 提示信息 -通过`info`属性设置徽标内容 +设置`dot`属性后,会在右上角展示一个小红点。设置`info`属性后,会在右上角展示相应的徽标 ```html - - + + ``` @@ -77,6 +77,7 @@ Page({ | 参数 | 说明 | 类型 | 默认值 | 版本 | |-----------|-----------|-----------|-------------|-------------| | title | 内容 | *string* | `''` | - | +| dot | 是否显示右上角小红点 | *boolean* | `false` | - | | info | 提示消息 | *string \| number* | `''` | - | ### SidebarItem Event