From 8a1d52a6a35ce89f5cf91a18f0a610aff58d55b5 Mon Sep 17 00:00:00 2001 From: neverland Date: Wed, 22 Apr 2020 17:19:00 +0800 Subject: [PATCH] docs(quickstart): add register Lazyload guide (#6110) --- docs/markdown/quickstart.en-US.md | 3 +++ docs/markdown/quickstart.zh-CN.md | 4 ++++ packages/vant-cli/README.md | 4 ++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/markdown/quickstart.en-US.md b/docs/markdown/quickstart.en-US.md index 323bb918a..43d7419e7 100644 --- a/docs/markdown/quickstart.en-US.md +++ b/docs/markdown/quickstart.en-US.md @@ -115,6 +115,9 @@ The easiest way to use Vant is to include a CDN link in the html file, after whi // Call function component vant.Toast('Message'); + + // Register Lazyload directive + Vue.use(vant.Lazyload); ``` diff --git a/docs/markdown/quickstart.zh-CN.md b/docs/markdown/quickstart.zh-CN.md index 6c1c27191..35922db31 100644 --- a/docs/markdown/quickstart.zh-CN.md +++ b/docs/markdown/quickstart.zh-CN.md @@ -132,6 +132,10 @@ Vue.use(Vant); // 调用函数组件,弹出一个 Toast vant.Toast('提示'); + + // 通过 CDN 引入时不会自动注册 Lazyload 组件 + // 可以通过下面的方式手动注册 + Vue.use(vant.Lazyload); ``` diff --git a/packages/vant-cli/README.md b/packages/vant-cli/README.md index 4853be16b..383d88c30 100644 --- a/packages/vant-cli/README.md +++ b/packages/vant-cli/README.md @@ -45,8 +45,8 @@ yarn add @vant/cli --dev } }, "lint-staged": { - "*.{ts,tsx,js,jsx,vue}": ["eslint", "git add"], - "*.{vue,css,less,scss}": ["stylelint", "git add"] + "*.{js,jsx,ts,tsx,vue}": "eslint --fix", + "*.{vue,css,less,scss}": "stylelint --fix" }, "eslintConfig": { "root": true,