From fcb9a4a8a9cad1139943023faa981a2af762d570 Mon Sep 17 00:00:00 2001 From: Yao Date: Mon, 9 Oct 2017 17:14:04 +0800 Subject: [PATCH 1/3] =?UTF-8?q?[new=20feature]=20Docs:=20waterfall=20?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E4=BC=98=E5=8C=96=20(#175)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * doc: change waterfall docs * change pr template --- .github/PULL_REQUEST_TEMPLATE.md | 15 +++++++++++++++ docs/examples-docs/zh-CN/waterfall.md | 14 ++++++++++++-- docs/src/doc.config.js | 4 ++++ 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 9ed032d1a..33f4ae89a 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -12,6 +12,21 @@ ### 请认真写 PR 的标题,会用于生成 change log。 +#### 标题规则 +[bug fix / breaking change / new feature] 组件名字:修改内容描述 + +说明: +* 前面方括号用来区分 Issue / PR 的 类型:bug fix - 改 bug;breaking change: 不兼容的改动;new feature:新功能 +* 修改内容尽可能言简意赅,总结 PR 的改动或者描述 Issue +* 描述请用中文 +* 组件名字请用英文,首字母大写 + +示例: +* [bug fix] Button: 修改颜色 +* [breaking change] Loading: 删除 `static` 属性 +* [new feature] Form: 增加 `FormSelection` 支持 +* [new feature] 新增 Abc 组件 + ### Please remove the above lines when you submit this pull request, also please fill in the changes you've made in this pull request. ### 提交 PR 前 请把以上内容删除,并填写以下内容。 diff --git a/docs/examples-docs/zh-CN/waterfall.md b/docs/examples-docs/zh-CN/waterfall.md index 00c2e406b..960de3ac7 100644 --- a/docs/examples-docs/zh-CN/waterfall.md +++ b/docs/examples-docs/zh-CN/waterfall.md @@ -31,6 +31,8 @@ export default { ### 代码演示 + + :::demo 基础用法(必须以:::demo开头,后面的描述可选,如果有的话控制在一两句话,不要过长) + ```html // :::demo后面必须接代码段,否则不会识别为示例 + // 在内容区直接写 vue 中 template 段代码即可 + Large + + ``` + ::: // 示例结束的标记,必须接在代码段之后,否则不会识别为示例 + +代码演示的几个书写原则: + +- 从简单用法开始介绍,不要上来就同时使用一大堆 API,会让人觉得难以上手 +- 正交性原则,一个示例只演示一个(或者一类)API 的使用方法,如无特殊需求不要在一个示例中同时演示多个 API 混合使用 +- 如果示例的一句话描述无法完整描述整个场景,可以在 `:::demo` 之前写一段详细的说明性文字 diff --git a/packages/vant-css/src/swipe.css b/packages/vant-css/src/swipe.css index d2ce57373..fbf724a9f 100644 --- a/packages/vant-css/src/swipe.css +++ b/packages/vant-css/src/swipe.css @@ -32,7 +32,6 @@ &__items { position: relative; overflow: hidden; - position: relative; height: 100%; } From d7d14d6630a9e3beee08e0a74f1b7874e751b902 Mon Sep 17 00:00:00 2001 From: Yao Date: Wed, 11 Oct 2017 00:50:12 +0800 Subject: [PATCH 3/3] =?UTF-8?q?[bug=20fix]=20Docs:=20=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=9C=A8=20windows=20=E4=B8=8B=E8=BF=9B=E8=A1=8C=E7=BC=96?= =?UTF-8?q?=E8=AF=91=20(#185)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * support windows filesystem * fix waterfall docs --- docs/examples-docs/zh-CN/waterfall.md | 4 +--- package.json | 2 +- yarn.lock | 6 +++--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/docs/examples-docs/zh-CN/waterfall.md b/docs/examples-docs/zh-CN/waterfall.md index 960de3ac7..5b6e58227 100644 --- a/docs/examples-docs/zh-CN/waterfall.md +++ b/docs/examples-docs/zh-CN/waterfall.md @@ -10,7 +10,7 @@ import Vue from 'vue'; import { Waterfall } from 'vant'; -Waterfall.install(Vue); +Vue.use(Waterfall); ``` #### 局部注册 @@ -41,12 +41,10 @@ export default { finished: false }; }, - directives: { WaterfallLower: Waterfall('lower'), WaterfallUpper: Waterfall('upper') }, - methods: { loadMore() { if (this.list.length >= 50) { diff --git a/package.json b/package.json index ea059373c..9c5a79078 100644 --- a/package.json +++ b/package.json @@ -119,6 +119,6 @@ "webpack-bundle-analyzer": "^2.9.0", "webpack-dev-server": "^2.7.1", "webpack-merge": "^4.1.0", - "zan-doc": "0.3.1" + "zan-doc": "0.3.2" } } diff --git a/yarn.lock b/yarn.lock index fef85a922..7ebfdec6c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7913,9 +7913,9 @@ yeast@0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419" -zan-doc@0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/zan-doc/-/zan-doc-0.3.1.tgz#f421a90eeb8e399e4257d52f671bffd14efbd28e" +zan-doc@0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/zan-doc/-/zan-doc-0.3.2.tgz#9493bc1d1a7e99f1316b8f47897de2dbf5b2bd0f" dependencies: cheerio "0.22.0" decamelize "^1.2.0"