From e3e8b80744f29ff3421db5591e4d32cc361346a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=98=89=E6=B6=B5?= Date: Fri, 2 Feb 2018 14:55:37 +0800 Subject: [PATCH] [Doc] update Vue.use usage --- docs/markdown/en-US/cell.md | 3 +-- docs/markdown/en-US/checkbox.md | 3 +-- docs/markdown/en-US/contact.md | 7 ++++--- docs/markdown/en-US/coupon.md | 3 +-- docs/markdown/en-US/goods-action.md | 7 ++++--- docs/markdown/en-US/layout.md | 3 +-- docs/markdown/en-US/password-input.md | 3 +-- docs/markdown/en-US/steps.md | 3 +-- docs/markdown/en-US/swipe.md | 3 +-- docs/markdown/en-US/tab.md | 3 +-- docs/markdown/en-US/tabbar.md | 3 +-- docs/markdown/zh-CN/cell.md | 3 +-- docs/markdown/zh-CN/checkbox.md | 3 +-- docs/markdown/zh-CN/contact.md | 7 ++++--- docs/markdown/zh-CN/coupon.md | 3 +-- docs/markdown/zh-CN/goods-action.md | 7 ++++--- docs/markdown/zh-CN/layout.md | 3 +-- docs/markdown/zh-CN/password-input.md | 3 +-- docs/markdown/zh-CN/steps.md | 3 +-- docs/markdown/zh-CN/swipe.md | 3 +-- docs/markdown/zh-CN/tab.md | 3 +-- docs/markdown/zh-CN/tabbar.md | 3 +-- docs/src/examples.js | 13 +++++++------ docs/src/index.js | 3 +-- 24 files changed, 42 insertions(+), 56 deletions(-) diff --git a/docs/markdown/en-US/cell.md b/docs/markdown/en-US/cell.md index d4b778666..109f09da0 100644 --- a/docs/markdown/en-US/cell.md +++ b/docs/markdown/en-US/cell.md @@ -4,8 +4,7 @@ ``` javascript import { Cell, CellGroup } from 'vant'; -Vue.use(Cell); -Vue.use(CellGroup); +Vue.use(Cell).use(CellGroup); ``` ### Usage diff --git a/docs/markdown/en-US/checkbox.md b/docs/markdown/en-US/checkbox.md index e1007b5b3..9cb5f436b 100644 --- a/docs/markdown/en-US/checkbox.md +++ b/docs/markdown/en-US/checkbox.md @@ -4,8 +4,7 @@ ``` javascript import { Checkbox, CheckboxGroup } from 'vant'; -Vue.use(Checkbox); -Vue.use(CheckboxGroup); +Vue.use(Checkbox).use(CheckboxGroup); ``` ### Usage diff --git a/docs/markdown/en-US/contact.md b/docs/markdown/en-US/contact.md index 213f3a7f5..26f8b9921 100644 --- a/docs/markdown/en-US/contact.md +++ b/docs/markdown/en-US/contact.md @@ -4,9 +4,10 @@ ``` javascript import { ContactCard, ContactList, ContactEdit } from 'vant'; -Vue.use(ContactCard); -Vue.use(ContactList); -Vue.use(ContactEdit); +Vue + .use(ContactCard) + .use(ContactList) + .use(ContactEdit); ``` ### Usage diff --git a/docs/markdown/en-US/coupon.md b/docs/markdown/en-US/coupon.md index f66831482..8c3f9a091 100644 --- a/docs/markdown/en-US/coupon.md +++ b/docs/markdown/en-US/coupon.md @@ -4,8 +4,7 @@ ``` javascript import { CouponCell, CouponList } from 'vant'; -Vue.use(CouponCell); -Vue.use(CouponList); +Vue.use(CouponCell).use(CouponList); ``` ### Usage diff --git a/docs/markdown/en-US/goods-action.md b/docs/markdown/en-US/goods-action.md index f85148200..0d082ca75 100644 --- a/docs/markdown/en-US/goods-action.md +++ b/docs/markdown/en-US/goods-action.md @@ -8,9 +8,10 @@ import { GoodsActionMiniBtn } from 'vant'; -Vue.use(GoodsAction); -Vue.use(GoodsActionBigBtn); -Vue.use(GoodsActionMiniBtn); +Vue + .use(GoodsAction) + .use(GoodsActionBigBtn) + .use(GoodsActionMiniBtn); ``` ### Usage diff --git a/docs/markdown/en-US/layout.md b/docs/markdown/en-US/layout.md index bc0582576..61a8b7c1e 100644 --- a/docs/markdown/en-US/layout.md +++ b/docs/markdown/en-US/layout.md @@ -6,8 +6,7 @@ Quickly and easily create layouts with `van-row` and `van-col` ``` javascript import { Row, Col } from 'vant'; -Vue.use(Row); -Vue.use(Col); +Vue.use(Row).use(Col); ``` ### Usage diff --git a/docs/markdown/en-US/password-input.md b/docs/markdown/en-US/password-input.md index 77af319db..82833f3c9 100644 --- a/docs/markdown/en-US/password-input.md +++ b/docs/markdown/en-US/password-input.md @@ -5,8 +5,7 @@ The PasswordInput component is usually used with [NumberKeyboard](#/en-US/compon ``` javascript import { PasswordInput, NumberKeyboard } from 'vant'; -Vue.use(PasswordInput); -Vue.use(NumberKeyboard); +Vue.use(PasswordInput).use(NumberKeyboard); ``` ### Usage diff --git a/docs/markdown/en-US/steps.md b/docs/markdown/en-US/steps.md index ab2a4609f..3daf6a28b 100644 --- a/docs/markdown/en-US/steps.md +++ b/docs/markdown/en-US/steps.md @@ -4,8 +4,7 @@ ``` javascript import { Step, Steps } from 'vant'; -Vue.use(Step); -Vue.use(Steps); +Vue.use(Step).use(Steps); ``` ### Usage diff --git a/docs/markdown/en-US/swipe.md b/docs/markdown/en-US/swipe.md index f8390f6d5..08aa3d835 100644 --- a/docs/markdown/en-US/swipe.md +++ b/docs/markdown/en-US/swipe.md @@ -4,8 +4,7 @@ ``` javascript import { Swipe, SwipeItem } from 'vant'; -Vue.use(Swipe); -Vue.use(SwipeItem); +Vue.use(Swipe).use(SwipeItem); ``` ### Usage diff --git a/docs/markdown/en-US/tab.md b/docs/markdown/en-US/tab.md index 5958eb59a..0d49dda37 100644 --- a/docs/markdown/en-US/tab.md +++ b/docs/markdown/en-US/tab.md @@ -4,8 +4,7 @@ ``` javascript import { Tab, Tabs } from 'vant'; -Vue.use(Tab); -Vue.use(Tabs); +Vue.use(Tab).use(Tabs); ``` ### Usage diff --git a/docs/markdown/en-US/tabbar.md b/docs/markdown/en-US/tabbar.md index 272ab1045..c923b6942 100644 --- a/docs/markdown/en-US/tabbar.md +++ b/docs/markdown/en-US/tabbar.md @@ -4,8 +4,7 @@ ``` javascript import { Tabbar, TabbarItem } from 'vant'; -Vue.use(Tabbar); -Vue.use(TabbarItem); +Vue.use(Tabbar).use(TabbarItem); ``` ### Usage diff --git a/docs/markdown/zh-CN/cell.md b/docs/markdown/zh-CN/cell.md index 5bc62dcd2..396956561 100644 --- a/docs/markdown/zh-CN/cell.md +++ b/docs/markdown/zh-CN/cell.md @@ -4,8 +4,7 @@ ``` javascript import { Cell, CellGroup } from 'vant'; -Vue.use(Cell); -Vue.use(CellGroup); +Vue.use(Cell).use(CellGroup); ``` ### 代码演示 diff --git a/docs/markdown/zh-CN/checkbox.md b/docs/markdown/zh-CN/checkbox.md index 957ae45ea..3a6fb9d52 100644 --- a/docs/markdown/zh-CN/checkbox.md +++ b/docs/markdown/zh-CN/checkbox.md @@ -4,8 +4,7 @@ ``` javascript import { Checkbox, CheckboxGroup } from 'vant'; -Vue.use(Checkbox); -Vue.use(CheckboxGroup); +Vue.use(Checkbox).use(CheckboxGroup); ``` ### 代码演示 diff --git a/docs/markdown/zh-CN/contact.md b/docs/markdown/zh-CN/contact.md index bb56ec77d..c839f1fc8 100644 --- a/docs/markdown/zh-CN/contact.md +++ b/docs/markdown/zh-CN/contact.md @@ -5,9 +5,10 @@ ``` javascript import { ContactCard, ContactList, ContactEdit } from 'vant'; -Vue.use(ContactCard); -Vue.use(ContactList); -Vue.use(ContactEdit); +Vue + .use(ContactCard) + .use(ContactList) + .use(ContactEdit); ``` ### 代码演示 diff --git a/docs/markdown/zh-CN/coupon.md b/docs/markdown/zh-CN/coupon.md index a9b5685fc..dac310fcc 100644 --- a/docs/markdown/zh-CN/coupon.md +++ b/docs/markdown/zh-CN/coupon.md @@ -4,8 +4,7 @@ ``` javascript import { CouponCell, CouponList } from 'vant'; -Vue.use(CouponCell); -Vue.use(CouponList); +Vue.use(CouponCell).use(CouponList); ``` ### 代码演示 diff --git a/docs/markdown/zh-CN/goods-action.md b/docs/markdown/zh-CN/goods-action.md index e6f6f14ad..428b5518b 100644 --- a/docs/markdown/zh-CN/goods-action.md +++ b/docs/markdown/zh-CN/goods-action.md @@ -8,9 +8,10 @@ import { GoodsActionMiniBtn } from 'vant'; -Vue.use(GoodsAction); -Vue.use(GoodsActionBigBtn); -Vue.use(GoodsActionMiniBtn); +Vue + .use(GoodsAction) + .use(GoodsActionBigBtn) + .use(GoodsActionMiniBtn); ``` ### 代码演示 diff --git a/docs/markdown/zh-CN/layout.md b/docs/markdown/zh-CN/layout.md index 0897d8a59..53ab3ba28 100644 --- a/docs/markdown/zh-CN/layout.md +++ b/docs/markdown/zh-CN/layout.md @@ -6,8 +6,7 @@ ``` javascript import { Row, Col } from 'vant'; -Vue.use(Row); -Vue.use(Col); +Vue.use(Row).use(Col); ``` ### 代码演示 diff --git a/docs/markdown/zh-CN/password-input.md b/docs/markdown/zh-CN/password-input.md index e17a4a4f9..df41942e2 100644 --- a/docs/markdown/zh-CN/password-input.md +++ b/docs/markdown/zh-CN/password-input.md @@ -5,8 +5,7 @@ ``` javascript import { PasswordInput, NumberKeyboard } from 'vant'; -Vue.use(PasswordInput); -Vue.use(NumberKeyboard); +Vue.use(PasswordInput).use(NumberKeyboard); ``` ### 代码演示 diff --git a/docs/markdown/zh-CN/steps.md b/docs/markdown/zh-CN/steps.md index 2063d693d..fb9a3b3f0 100644 --- a/docs/markdown/zh-CN/steps.md +++ b/docs/markdown/zh-CN/steps.md @@ -4,8 +4,7 @@ ``` javascript import { Step, Steps } from 'vant'; -Vue.use(Step); -Vue.use(Steps); +Vue.use(Step).use(Steps); ``` ### 代码演示 diff --git a/docs/markdown/zh-CN/swipe.md b/docs/markdown/zh-CN/swipe.md index 47c7dcfd8..4fa730cd7 100644 --- a/docs/markdown/zh-CN/swipe.md +++ b/docs/markdown/zh-CN/swipe.md @@ -4,8 +4,7 @@ ``` javascript import { Swipe, SwipeItem } from 'vant'; -Vue.use(Swipe); -Vue.use(SwipeItem); +Vue.use(Swipe).use(SwipeItem); ``` ### 代码演示 diff --git a/docs/markdown/zh-CN/tab.md b/docs/markdown/zh-CN/tab.md index bd154372c..e3e3a94bb 100644 --- a/docs/markdown/zh-CN/tab.md +++ b/docs/markdown/zh-CN/tab.md @@ -4,8 +4,7 @@ ``` javascript import { Tab, Tabs } from 'vant'; -Vue.use(Tab); -Vue.use(Tabs); +Vue.use(Tab).use(Tabs); ``` ### 代码演示 diff --git a/docs/markdown/zh-CN/tabbar.md b/docs/markdown/zh-CN/tabbar.md index 94238e7ed..d633fd315 100644 --- a/docs/markdown/zh-CN/tabbar.md +++ b/docs/markdown/zh-CN/tabbar.md @@ -4,8 +4,7 @@ ``` javascript import { Tabbar, TabbarItem } from 'vant'; -Vue.use(Tabbar); -Vue.use(TabbarItem); +Vue.use(Tabbar).use(TabbarItem); ``` ### 代码演示 diff --git a/docs/src/examples.js b/docs/src/examples.js index 1fe6abe65..5f1448dd3 100644 --- a/docs/src/examples.js +++ b/docs/src/examples.js @@ -9,12 +9,13 @@ import 'packages/vant-css/src/icon-local.css'; import 'vant-doc/src/helper/touch-simulator'; import './components/nprogress.css'; -Vue.use(Vant); -Vue.use(VantDoc); -Vue.use(Lazyload, { - lazyComponent: true -}); -Vue.use(VueRouter); +Vue + .use(Vant) + .use(VantDoc) + .use(VueRouter) + .use(Lazyload, { + lazyComponent: true + }); const routesConfig = routes(true); const router = new VueRouter({ diff --git a/docs/src/index.js b/docs/src/index.js index 2fc6e3e1c..197afa9eb 100644 --- a/docs/src/index.js +++ b/docs/src/index.js @@ -6,8 +6,7 @@ import VantDoc from 'vant-doc'; import isMobile from './utils/is-mobile'; import './components/nprogress.css'; -Vue.use(VueRouter); -Vue.use(VantDoc); +Vue.use(VueRouter).use(VantDoc); const routesConfig = routes();