lock CDN resource version for 1.x docs

pull/7851/head
Leopoldthecoder 2017-10-27 17:41:04 +08:00 committed by 杨奕
parent 2a745aa8bf
commit b53dcd1766
4 changed files with 22 additions and 22 deletions

View File

@ -145,8 +145,8 @@ ElementLocale.i18n((key, value) => i18n.t(key, value))
```html ```html
<script src="//unpkg.com/vue"></script> <script src="//unpkg.com/vue"></script>
<script src="//unpkg.com/element-ui"></script> <script src="//unpkg.com/element-ui@1.4"></script>
<script src="//unpkg.com/element-ui/lib/umd/locale/en.js"></script> <script src="//unpkg.com/element-ui@1.4/lib/umd/locale/en.js"></script>
<script> <script>
ELEMENT.locale(ELEMENT.lang.en) ELEMENT.locale(ELEMENT.lang.en)
@ -158,9 +158,9 @@ Compatible with `vue-i18n`
```html ```html
<script src="//unpkg.com/vue"></script> <script src="//unpkg.com/vue"></script>
<script src="//unpkg.com/vue-i18n/dist/vue-i18n.js"></script> <script src="//unpkg.com/vue-i18n/dist/vue-i18n.js"></script>
<script src="//unpkg.com/element-ui"></script> <script src="//unpkg.com/element-ui@1.4"></script>
<script src="//unpkg.com/element-ui/lib/umd/locale/zh-CN.js"></script> <script src="//unpkg.com/element-ui@1.4/lib/umd/locale/zh-CN.js"></script>
<script src="//unpkg.com/element-ui/lib/umd/locale/en.js"></script> <script src="//unpkg.com/element-ui@1.4/lib/umd/locale/en.js"></script>
<script> <script>
Vue.locale('en', ELEMENT.lang.en) Vue.locale('en', ELEMENT.lang.en)

View File

@ -8,17 +8,17 @@ npm i element-ui -S
``` ```
### CDN ### CDN
Get the latest version from [unpkg.com/element-ui](https://unpkg.com/element-ui/) , and import JavaScript and CSS file in your page. Get the latest version from [unpkg.com/element-ui](https://unpkg.com/element-ui@1.4/) , and import JavaScript and CSS file in your page.
```html ```html
<!-- import CSS --> <!-- import CSS -->
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-default/index.css"> <link rel="stylesheet" href="https://unpkg.com/element-ui@1.4/lib/theme-default/index.css">
<!-- import JavaScript --> <!-- import JavaScript -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script> <script src="https://unpkg.com/element-ui@1.4/lib/index.js"></script>
``` ```
### Hello world ### Hello world
If you are using CDN, a hello-world page is easy with Element. [Online Demo](http://codepen.io/QingWei-Li/pen/vXwJrY) If you are using CDN, a hello-world page is easy with Element. [Online Demo](https://jsfiddle.net/hzfpyvg6/18/)
```html ```html
<!DOCTYPE html> <!DOCTYPE html>
@ -26,7 +26,7 @@ If you are using CDN, a hello-world page is easy with Element. [Online Demo](htt
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<!-- import CSS --> <!-- import CSS -->
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-default/index.css"> <link rel="stylesheet" href="https://unpkg.com/element-ui@1.4/lib/theme-default/index.css">
</head> </head>
<body> <body>
<div id="app"> <div id="app">
@ -39,7 +39,7 @@ If you are using CDN, a hello-world page is easy with Element. [Online Demo](htt
<!-- import Vue before Element --> <!-- import Vue before Element -->
<script src="https://unpkg.com/vue/dist/vue.js"></script> <script src="https://unpkg.com/vue/dist/vue.js"></script>
<!-- import JavaScript --> <!-- import JavaScript -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script> <script src="https://unpkg.com/element-ui@1.4/lib/index.js"></script>
<script> <script>
new Vue({ new Vue({
el: '#app', el: '#app',

View File

@ -157,8 +157,8 @@ ElementLocale.i18n((key, value) => i18n.t(key, value))
```html ```html
<script src="//unpkg.com/vue"></script> <script src="//unpkg.com/vue"></script>
<script src="//unpkg.com/element-ui"></script> <script src="//unpkg.com/element-ui@1.4"></script>
<script src="//unpkg.com/element-ui/lib/umd/locale/en.js"></script> <script src="//unpkg.com/element-ui@1.4/lib/umd/locale/en.js"></script>
<script> <script>
ELEMENT.locale(ELEMENT.lang.en) ELEMENT.locale(ELEMENT.lang.en)
@ -170,9 +170,9 @@ ElementLocale.i18n((key, value) => i18n.t(key, value))
```html ```html
<script src="//unpkg.com/vue"></script> <script src="//unpkg.com/vue"></script>
<script src="//unpkg.com/vue-i18n/dist/vue-i18n.js"></script> <script src="//unpkg.com/vue-i18n/dist/vue-i18n.js"></script>
<script src="//unpkg.com/element-ui"></script> <script src="//unpkg.com/element-ui@1.4"></script>
<script src="//unpkg.com/element-ui/lib/umd/locale/zh-CN.js"></script> <script src="//unpkg.com/element-ui@1.4/lib/umd/locale/zh-CN.js"></script>
<script src="//unpkg.com/element-ui/lib/umd/locale/en.js"></script> <script src="//unpkg.com/element-ui@1.4/lib/umd/locale/en.js"></script>
<script> <script>
Vue.locale('en', ELEMENT.lang.en) Vue.locale('en', ELEMENT.lang.en)

View File

@ -8,17 +8,17 @@ npm i element-ui -S
``` ```
### CDN ### CDN
目前可以通过 [unpkg.com/element-ui](https://unpkg.com/element-ui/) 获取到最新版本的资源,在页面上引入 js 和 css 文件即可开始使用。 目前可以通过 [unpkg.com/element-ui](https://unpkg.com/element-ui@1.4/) 获取到最新版本的资源,在页面上引入 js 和 css 文件即可开始使用。
```html ```html
<!-- 引入样式 --> <!-- 引入样式 -->
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-default/index.css"> <link rel="stylesheet" href="https://unpkg.com/element-ui@1.4/lib/theme-default/index.css">
<!-- 引入组件库 --> <!-- 引入组件库 -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script> <script src="https://unpkg.com/element-ui@1.4/lib/index.js"></script>
``` ```
### Hello world ### Hello world
通过 CDN 的方式我们可以很容易地使用 Element 写出一个 Hello world 页面。[在线演示](http://codepen.io/QingWei-Li/pen/vXwJrY) 通过 CDN 的方式我们可以很容易地使用 Element 写出一个 Hello world 页面。[在线演示](https://jsfiddle.net/hzfpyvg6/18/)
```html ```html
<!DOCTYPE html> <!DOCTYPE html>
@ -26,7 +26,7 @@ npm i element-ui -S
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<!-- 引入样式 --> <!-- 引入样式 -->
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-default/index.css"> <link rel="stylesheet" href="https://unpkg.com/element-ui@1.4/lib/theme-default/index.css">
</head> </head>
<body> <body>
<div id="app"> <div id="app">
@ -39,7 +39,7 @@ npm i element-ui -S
<!-- 先引入 Vue --> <!-- 先引入 Vue -->
<script src="https://unpkg.com/vue/dist/vue.js"></script> <script src="https://unpkg.com/vue/dist/vue.js"></script>
<!-- 引入组件库 --> <!-- 引入组件库 -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script> <script src="https://unpkg.com/element-ui@1.4/lib/index.js"></script>
<script> <script>
new Vue({ new Vue({
el: '#app', el: '#app',