From d61cbdd086c9050fa467803be676a1eb14d50f16 Mon Sep 17 00:00:00 2001 From: chenjiahan Date: Tue, 17 Mar 2020 20:49:08 +0800 Subject: [PATCH] feat(TabbarItem): add badge prop, mark info prop as deprecated --- src/tabbar-item/index.js | 6 +++++- src/tabbar/README.md | 8 ++++---- src/tabbar/README.zh-CN.md | 13 +++++++------ src/tabbar/demo/index.vue | 8 ++++---- 4 files changed, 20 insertions(+), 15 deletions(-) diff --git a/src/tabbar-item/index.js b/src/tabbar-item/index.js index 95190c94e..80b273532 100644 --- a/src/tabbar-item/index.js +++ b/src/tabbar-item/index.js @@ -20,6 +20,7 @@ export default createComponent({ icon: String, name: [Number, String], info: [Number, String], + badge: [Number, String], iconPrefix: String, }, @@ -70,7 +71,10 @@ export default createComponent({
{this.genIcon(active)} - +
{this.slots('default', { active })}
diff --git a/src/tabbar/README.md b/src/tabbar/README.md index 6da4777e8..fd49ea700 100644 --- a/src/tabbar/README.md +++ b/src/tabbar/README.md @@ -60,8 +60,8 @@ export default { Tab Tab - Tab - Tab + Tab + Tab ``` @@ -71,7 +71,7 @@ Use `icon` slot to custom icon ```html - + Custom 标签 标签 - 标签 - 标签 + 标签 + 标签 ``` @@ -77,7 +77,7 @@ export default { ```html - + 自定义 {{ $t('tab') }} {{ $t('tab') }} - + {{ $t('tab') }} - + {{ $t('tab') }} @@ -41,7 +41,7 @@ - + {{ $t('custom') }}