From 99259a863f54a439572fb850b75c5bb9d515b06c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=98=89=E6=B6=B5?= Date: Thu, 24 Aug 2017 14:25:22 +0800 Subject: [PATCH 1/5] Doc: add touch simulator --- docs/src/doc.config.js | 10 +++++----- docs/src/examples.js | 1 + package.json | 6 +++--- yarn.lock | 24 ++++++++++++------------ 4 files changed, 21 insertions(+), 20 deletions(-) diff --git a/docs/src/doc.config.js b/docs/src/doc.config.js index 110f0cadb..655038e57 100644 --- a/docs/src/doc.config.js +++ b/docs/src/doc.config.js @@ -26,21 +26,21 @@ module.exports = { "title": "快速上手", noExample: true }, + { + "title": "业务组件", + "link": "/zanui/captain/component/quickstart" + }, { "path": "/changelog", "title": "更新日志", noExample: true - }, - { - "title": "业务组件", - "link": "/zanui/captain/component/quickstart" } ] } ] }, { - "name": "组件列表", + "name": "组件", "showInMobile": true, "groups": [ { diff --git a/docs/src/examples.js b/docs/src/examples.js index 73f943ae6..5126b64c3 100644 --- a/docs/src/examples.js +++ b/docs/src/examples.js @@ -5,6 +5,7 @@ import routes from './router.config'; import ZanUI from 'packages/index'; import ZanDoc from 'zan-doc'; import 'packages/vant-css/src/index.css'; +import 'zan-doc/src/helper/touch-simulator'; import DemoList from './components/demo-list.vue'; diff --git a/package.json b/package.json index 706d14a9f..f6ff3a9f2 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "cross-env": "^5.0.5", "css-loader": "^0.28.5", "eslint-plugin-vue": "^2.1.0", - "extract-text-webpack-plugin": "2.1.2", + "extract-text-webpack-plugin": "^3.0.0", "felint": "^0.5.0-alpha.3", "file-loader": "^0.11.2", "file-save": "^0.2.0", @@ -108,7 +108,7 @@ "vue": "^2.4.2", "vue-html-loader": "^1.2.4", "vue-loader": "^13.0.4", - "vue-markdown-loader": "^2.0.0", + "vue-markdown-loader": "^2.1.0", "vue-router": "^2.7.0", "vue-sfc-compiler": "^0.0.2", "vue-style-loader": "^3.0.0", @@ -116,6 +116,6 @@ "webpack": "^3.5.5", "webpack-dev-server": "^2.7.1", "webpack-merge": "^4.1.0", - "zan-doc": "^0.2.1" + "zan-doc": "^0.2.2" } } diff --git a/yarn.lock b/yarn.lock index f546eae28..de34d1c02 100644 --- a/yarn.lock +++ b/yarn.lock @@ -305,7 +305,7 @@ async@2.1.4: dependencies: lodash "^4.14.0" -async@^2.1.2: +async@^2.1.2, async@^2.4.1: version "2.5.0" resolved "https://registry.yarnpkg.com/async/-/async-2.5.0.tgz#843190fd6b7357a0b9e1c956edddd5ec8462b54d" dependencies: @@ -2768,12 +2768,12 @@ extglob@^0.3.1: dependencies: is-extglob "^1.0.0" -extract-text-webpack-plugin@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/extract-text-webpack-plugin/-/extract-text-webpack-plugin-2.1.2.tgz#756ef4efa8155c3681833fbc34da53b941746d6c" +extract-text-webpack-plugin@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/extract-text-webpack-plugin/-/extract-text-webpack-plugin-3.0.0.tgz#90caa7907bc449f335005e3ac7532b41b00de612" dependencies: - async "^2.1.2" - loader-utils "^1.0.2" + async "^2.4.1" + loader-utils "^1.1.0" schema-utils "^0.3.0" webpack-sources "^1.0.1" @@ -7603,9 +7603,9 @@ vue-loader@^13.0.4: vue-style-loader "^3.0.0" vue-template-es2015-compiler "^1.5.3" -vue-markdown-loader@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/vue-markdown-loader/-/vue-markdown-loader-2.0.0.tgz#d3cadbf9c8976a81f2d5e39496d505fd4f31bc96" +vue-markdown-loader@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/vue-markdown-loader/-/vue-markdown-loader-2.1.0.tgz#112d1921dd56daa29906b7c012623c6c5d6e0d8c" dependencies: cheerio "^0.20.0" highlight.js "^9.4.0" @@ -7926,9 +7926,9 @@ yeast@0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419" -zan-doc@^0.2.1: - version "0.2.1" - resolved "https://registry.npmjs.org/zan-doc/-/zan-doc-0.2.1.tgz#34723ea180d0ac2e183b66d2a3e4a04b4f6fe91b" +zan-doc@^0.2.2: + version "0.2.2" + resolved "https://registry.npmjs.org/zan-doc/-/zan-doc-0.2.2.tgz#ebf8ffda5bd3cf9277cc3e59c48476a3fbf84d9f" dependencies: cheerio "0.22.0" decamelize "^1.2.0" From ac4b739814bb11c848ed1de00f8b3a05426a7a8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=98=89=E6=B6=B5?= Date: Thu, 24 Aug 2017 14:38:22 +0800 Subject: [PATCH 2/5] Uploader: optimize template --- packages/uploader/index.vue | 89 ++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 46 deletions(-) diff --git a/packages/uploader/index.vue b/packages/uploader/index.vue index b0b8d4ede..59d120bbc 100644 --- a/packages/uploader/index.vue +++ b/packages/uploader/index.vue @@ -1,57 +1,54 @@ From 5b1e27073deb96c8fffc952857d3cb9f192e16cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=98=89=E6=B6=B5?= Date: Thu, 24 Aug 2017 15:07:00 +0800 Subject: [PATCH 3/5] Progress: optimzie dom struct --- docs/examples-docs/progress.md | 63 ++++++++++-------------------- packages/progress/index.vue | 53 +++++++------------------ packages/vant-css/src/progress.css | 45 ++++++++++----------- 3 files changed, 55 insertions(+), 106 deletions(-) diff --git a/docs/examples-docs/progress.md b/docs/examples-docs/progress.md index efb9a2993..917183190 100644 --- a/docs/examples-docs/progress.md +++ b/docs/examples-docs/progress.md @@ -1,13 +1,11 @@ - ## Progress 进度条 ### 使用指南 @@ -21,57 +19,37 @@ Vue.component(Progress.name, Progress); #### 基础用法 -默认情况进度条为蓝色,使用`percentage`属性来设置当前进度。 +进度条默认为蓝色,使用`percentage`属性来设置当前进度 :::demo 基础用法 ```html -
- -
-
- -
-
- -
+ + + ``` ::: -#### Inactive +#### 进度条置灰 -是否置灰进度条,一般用于进度条被取消时。 - -:::demo Inactive +:::demo 进度条置灰 ```html -
- -
-
- -
-
- -
+ + + ``` ::: -#### 自定义颜色和文字 +#### 样式定制 可以使用`pivot-text`属性自定义文字,`color`属性自定义进度条颜色 -:::demo 自定义颜色和文字 +:::demo 样式定制 ```html -
- -
-
- -
-
- -
+ + + ``` ::: @@ -79,9 +57,8 @@ Vue.component(Progress.name, Progress); | 参数 | 说明 | 类型 | 默认值 | 可选值 | |-----------|-----------|-----------|-------------|-------------| -| inactive | 是否置灰 | `boolean` | `false` | `true`, `false` | -| percentage | 进度百分比 | `number` | `false` | `0-100` | -| pivotText | 文字显示 | `string` | 百分比文字 | - | -| color | 进度条颜色 | `string` | `#38f` | hexvalue | -| textColor | 进度条文字颜色 | `string` | `#fff` | hexvalue | - +| inactive | 是否置灰 | `boolean` | `false` | | +| percentage | 进度百分比 | `number` | `false` | `0-100` | +| pivotText | 文字显示 | `string` | 百分比文字 | - | +| color | 进度条颜色 | `string` | `#38f` | hexvalue | +| textColor | 进度条文字颜色 | `string` | `#fff` | hexvalue | diff --git a/packages/progress/index.vue b/packages/progress/index.vue index 4e89cfd58..685a46135 100644 --- a/packages/progress/index.vue +++ b/packages/progress/index.vue @@ -1,27 +1,11 @@