Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Element
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林焕东
Element
Commits
c4463231
Commit
c4463231
authored
Oct 28, 2016
by
qingwei.li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc: add installation
parent
9cec78ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
0 deletions
+56
-0
examples/docs/zh-cn/installation.md
examples/docs/zh-cn/installation.md
+53
-0
examples/nav.config.json
examples/nav.config.json
+3
-0
No files found.
examples/docs/zh-cn/installation.md
0 → 100644
View file @
c4463231
## 安装
### npm 安装
推荐使用 npm 的方式安装,它能更好的和
[
webpack
](
https://webpack.js.org/
)
打包工具配合使用。
```
shell
npm i element-ui@next
-D
```
**由于当前还处于 rc 阶段,所以仍然需要通过 @next 的方式获取最新版本。**
### CDN
目前可以通过
[
unpkg.com/element-ui
](
https://unpkg.com/element-ui@next/
)
获取到最新版本的资源,在页面上引入 js 和 css 文件即可开始使用。
```
html
<!-- 引入样式 -->
<link
rel=
"stylesheet"
href=
"https://unpkg.com/element-ui@1.0.0-rc.8/lib/theme-default/index.css"
>
<!-- 引入组件库 -->
<script
src=
"https://unpkg.com/element-ui@1.0.0-rc.8/lib/index.js"
></script>
```
### Hello world
通过 cdn 的方式我们可以很容易的使用 Element 写一个 Hello world 页面。
[
在线演示
](
http://codepen.io/QingWei-Li/pen/vXwJrY
)
```
html
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"UTF-8"
>
<!-- 引入样式 -->
<link
rel=
"stylesheet"
href=
"https://unpkg.com/element-ui@1.0.0-rc.8/lib/theme-default/index.css"
>
</head>
<body>
<div
id=
"app"
>
<el-button
@
click.native=
"visible = true"
>
按钮
</el-button>
<el-dialog
v-model=
"visible"
title=
"Hello world"
>
<p>
欢迎使用 Element
</p>
</el-dialog>
</div>
</body>
<!-- 先引入 Vue -->
<script
src=
"https://unpkg.com/vue@2.0.3/dist/vue.js"
></script>
<!-- 引入组件库 -->
<script
src=
"https://unpkg.com/element-ui@1.0.0-rc.8/lib/index.js"
></script>
<script>
new
Vue
({
el
:
'
#app
'
,
data
:
function
()
{
return
{
visible
:
false
}
}
})
</script>
</html>
```
examples/nav.config.json
View file @
c4463231
...
@@ -2,6 +2,9 @@
...
@@ -2,6 +2,9 @@
{
{
"name"
:
"安装指南"
,
"name"
:
"安装指南"
,
"children"
:
[{
"children"
:
[{
"path"
:
"/installation"
,
"name"
:
"安装"
},{
"path"
:
"/quickstart"
,
"path"
:
"/quickstart"
,
"name"
:
"快速上手"
"name"
:
"快速上手"
},
{
},
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment