From 9b6a21073bdcd359d965944783cebccd1d59a78f Mon Sep 17 00:00:00 2001 From: Leopoldthecoder Date: Mon, 30 Oct 2017 18:14:27 +0800 Subject: [PATCH] add CDN tips --- examples/docs/en-US/installation.md | 12 ++++++++++-- examples/docs/en-US/quickstart.md | 6 +++--- examples/docs/zh-CN/installation.md | 12 ++++++++++-- examples/docs/zh-CN/quickstart.md | 6 +++--- 4 files changed, 26 insertions(+), 10 deletions(-) diff --git a/examples/docs/en-US/installation.md b/examples/docs/en-US/installation.md index c9c0ae643..ce8d8ee24 100644 --- a/examples/docs/en-US/installation.md +++ b/examples/docs/en-US/installation.md @@ -3,8 +3,12 @@ ### npm Installing with npm is recommended and it works seamlessly with [webpack](https://webpack.js.org/). +:::tip +Note that this doc is for 1.x, so you need the `legacy` tag when installing. +::: + ```shell -npm i element-ui -S +npm i element-ui@legacy -S ``` ### CDN @@ -17,6 +21,10 @@ Get the latest version from [unpkg.com/element-ui](https://unpkg.com/element-ui@ ``` +:::tip +We recommend our users to lock Element's version when using CDN. For example, if you're using Element 1.4.8, you can lock CSS and JavaScript files like this: `https://unpkg.com/element-ui@1.4.8/lib/theme-default/index.css`, `https://unpkg.com/element-ui@1.4.8/lib/index.js`. +::: + ### Hello world If you are using CDN, a hello-world page is easy with Element. [Online Demo](https://jsfiddle.net/hzfpyvg6/18/) @@ -37,7 +45,7 @@ If you are using CDN, a hello-world page is easy with Element. [Online Demo](htt - + ``` +:::tip +我们建议使用 CDN 引入 Element 的用户在链接地址上锁定版本,以免将来 Element 升级时受到非兼容性更新的影响。例如,如需锁定版本为 1.4.8,则 CSS 和 JavaScript 文件的地址分别是 `https://unpkg.com/element-ui@1.4.8/lib/theme-default/index.css` 和 `https://unpkg.com/element-ui@1.4.8/lib/index.js`。 +::: + ### Hello world 通过 CDN 的方式我们可以很容易地使用 Element 写出一个 Hello world 页面。[在线演示](https://jsfiddle.net/hzfpyvg6/18/) @@ -37,7 +45,7 @@ npm i element-ui -S - +