From d736aec1083f92fb766991a60daa972e154c0b6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E4=B8=BD?= Date: Wed, 7 Feb 2018 18:44:11 +0800 Subject: [PATCH] page for badge --- .gitignore | 3 + components/badge/badgeTypes.js | 10 ++ components/badge/demo/basic.md | 23 ++++ components/badge/demo/change.md | 56 +++++++++ components/badge/demo/dot.md | 20 ++++ components/badge/demo/index.vue | 165 ++++++++------------------- components/badge/demo/link.md | 20 ++++ components/badge/demo/no-wrapper.md | 20 ++++ components/badge/demo/overflow.md | 26 +++++ components/badge/demo/status.md | 31 +++++ components/badge/index.en_US.md | 21 ++++ components/badge/index.zh-CN.md | 21 ++++ components/breadcrumb/index.zh-CN.md | 50 ++++++++ components/button/demo/ghost.md | 1 + 14 files changed, 347 insertions(+), 120 deletions(-) create mode 100644 components/badge/badgeTypes.js create mode 100644 components/badge/demo/basic.md create mode 100644 components/badge/demo/change.md create mode 100644 components/badge/demo/dot.md create mode 100644 components/badge/demo/link.md create mode 100644 components/badge/demo/no-wrapper.md create mode 100644 components/badge/demo/overflow.md create mode 100644 components/badge/demo/status.md create mode 100644 components/badge/index.en_US.md create mode 100644 components/badge/index.zh-CN.md create mode 100644 components/breadcrumb/index.zh-CN.md diff --git a/.gitignore b/.gitignore index 9416a7fd1..51b07a34e 100644 --- a/.gitignore +++ b/.gitignore @@ -59,3 +59,6 @@ typings/ .idea .DS_Store dist/ + +# 备份文件 +/components/test/* diff --git a/components/badge/badgeTypes.js b/components/badge/badgeTypes.js new file mode 100644 index 000000000..2621a4ce0 --- /dev/null +++ b/components/badge/badgeTypes.js @@ -0,0 +1,10 @@ +import PropTypes from '../_util/vue-types' +export default () => ({ + count: PropTypes.number, + dot: PropTypes.bool, + offset: PropTypes.arrayOf([PropTypes.number, PropTypes.number]), + overflowCount: PropTypes.number.def('99'), + showZero: PropTypes.bool.def('false'), + status: PropTypes.oneOf(['success', 'processing', 'default', 'error', 'warning']), + text: PropTypes.string, +}) diff --git a/components/badge/demo/basic.md b/components/badge/demo/basic.md new file mode 100644 index 000000000..30b568973 --- /dev/null +++ b/components/badge/demo/basic.md @@ -0,0 +1,23 @@ + +#### 基本 +简单的徽章展示,当 `count` 为 `0` 时,默认不显示,但是可以使用 `showZero` 修改为显示。 + + + +#### basic +Simplest Usage. Badge will be hidden when `count` is `0`, but we can use `showZero` to show it. + + +```html + +``` + diff --git a/components/badge/demo/change.md b/components/badge/demo/change.md new file mode 100644 index 000000000..b5ade5ddc --- /dev/null +++ b/components/badge/demo/change.md @@ -0,0 +1,56 @@ + +#### 动态 + 展示动态变化的效果。 + + + +#### Dynamic + The count will be animated as it changes. + + +```html + + +``` diff --git a/components/badge/demo/dot.md b/components/badge/demo/dot.md new file mode 100644 index 000000000..fcf04364f --- /dev/null +++ b/components/badge/demo/dot.md @@ -0,0 +1,20 @@ + +#### 讨嫌的小红点 +没有具体的数字。 + + + +#### Red badge +This will simply display a red badge, without a specific count. + + +```html + +``` diff --git a/components/badge/demo/index.vue b/components/badge/demo/index.vue index 6aeb8d7ca..0b39bcacd 100644 --- a/components/badge/demo/index.vue +++ b/components/badge/demo/index.vue @@ -1,126 +1,51 @@ - -