Commit 05704d5d authored by qingwei.li's avatar qingwei.li

doc: add cdn usage, #134

parent 85495b61
...@@ -61,3 +61,19 @@ Vue.component(Button.name, Button); ...@@ -61,3 +61,19 @@ Vue.component(Button.name, Button);
]]] ]]]
} }
``` ```
### 通过标签全局引入
这里用 unpkg cdn 做示范。请先引入 Vue 再引入组件,加载完成后会自动注册,参考 [示例](https://codepen.io/anon/pen/ozYpNA)
```html
<!-- 引入样式 -->
<link rel="stylesheet" href="//unpkg.com/element-ui@1.0.0-rc.4/lib/theme-default/index.css">
<!-- body -->
<!-- 引入组件库 -->
<script src="//unpkg.com/vue@2.0.0-rc.6/dist/vue.js"></script>
<script src="//unpkg.com/element-ui@1.0.0-rc.4/lib/index.js"></script>
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment