From 874dd0cefaa2dd6a667a6aa43fdc0198768d3a5f Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 9 Nov 2017 02:20:57 -0600 Subject: [PATCH] [new feature] add spinner type loading (#297) * [bugfix] CouponList always show empty info * [bugfix] add click feedback of buttons in components * [Doc] add custom theme document * [new feature] Notice bar support more props * [bugfix] PullRefresh test cases * [bugfix] unused NoticeBar style * [bugfix] Swipe width calc error * [Doc] english document of all action components * [Doc] change document site path to /zanui/vant * [Doc] fix * [bugfix] uploader style error * [bugfix] tabs document demo * [new feature] Cell support vue-router target route * [bugfix] add cell test cases * update yarn.lock * [bugfix] Tabbar cann't display info when use icon slot * [Doc] update document title * [bugfix] Dialog should reset button text when showed * [new feature] CouponList add showCloseButton prop * [new feature] Swipe add 'initialSwipe' prop * [bugfix] NoticeBar text disappeared when page back * [new feature] ImagePreview support startPosition * fix: improve imagePreview test cases * [bugfix] Steps style error when has more than 4 items * [new feature] normalize size of all icons * [new feature] Stepper add plus & minus event * fix: yarn.lock * [bugfix] addressEdit icon render failed * [new feature] toast add mask option * [new feature] add spinner type loading --- docs/examples-docs/en-US/loading.md | 19 ++++++++---- docs/examples-docs/zh-CN/loading.md | 19 ++++++++---- packages/loading/index.vue | 8 +++-- packages/vant-css/src/loading.css | 46 +++++++++++++++++++++++++---- 4 files changed, 74 insertions(+), 18 deletions(-) diff --git a/docs/examples-docs/en-US/loading.md b/docs/examples-docs/en-US/loading.md index dbc2f2382..0f4348d9c 100644 --- a/docs/examples-docs/en-US/loading.md +++ b/docs/examples-docs/en-US/loading.md @@ -9,27 +9,36 @@ Vue.component(Loading.name, Loading); ### Usage -#### Solid color +#### Solid Circle -:::demo Solid color +:::demo Solid Circle ```html ``` ::: -#### Gradient color +#### Gradient Circle -:::demo Gradient color +:::demo Gradient Circle ```html ``` ::: +#### Spinner + +:::demo Spinner +```html + + +``` +::: + ### API | Attribute | Description | Type | Default | Accepted Values | |-----------|-----------|-----------|-------------|-------------| | color | Color | `String` | `black` | `black` `white` | -| type | Type | `String` | `gradient-circle` | `gradient-circle` `circle` | +| type | Type | `String` | `gradient-circle` | `spinner` `circle` | diff --git a/docs/examples-docs/zh-CN/loading.md b/docs/examples-docs/zh-CN/loading.md index 8561e2acc..1df7f40b9 100644 --- a/docs/examples-docs/zh-CN/loading.md +++ b/docs/examples-docs/zh-CN/loading.md @@ -18,27 +18,36 @@ Vue.component(Loading.name, Loading); ### 代码演示 -#### 单色 spinner +#### 单色圆环 -:::demo 单色 spinner +:::demo 单色圆环 ```html ``` ::: -#### 渐变色 spinner +#### 渐变色圆环 -:::demo 渐变色 spinner +:::demo 渐变色圆环 ```html ``` ::: +#### Spinner + +:::demo Spinner +```html + + +``` +::: + ### API | 参数 | 说明 | 类型 | 默认值 | 可选值 | |-----------|-----------|-----------|-------------|-------------| | color | 颜色 | `String` | `black` | `black` `white` | -| type | 类型 | `String` | `gradient-circle` | `gradient-circle` `circle` | +| type | 类型 | `String` | `gradient-circle` | `spinner` `circle` | diff --git a/packages/loading/index.vue b/packages/loading/index.vue index 75e8f7b33..b263948f6 100644 --- a/packages/loading/index.vue +++ b/packages/loading/index.vue @@ -1,11 +1,13 @@