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
f98998ab
Commit
f98998ab
authored
Aug 30, 2016
by
baiyaaaaa
Committed by
GitHub
Aug 30, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #122 from baiyaaaaa/next
add quickstart and develop page
parents
1cb5b162
1fd574c5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
99 additions
and
8 deletions
+99
-8
examples/app.vue
examples/app.vue
+11
-0
examples/components/header.vue
examples/components/header.vue
+1
-1
examples/docs/development.md
examples/docs/development.md
+22
-1
examples/docs/quickstart.md
examples/docs/quickstart.md
+58
-3
examples/pages/index.vue
examples/pages/index.vue
+3
-3
package.json
package.json
+4
-0
No files found.
examples/app.vue
View file @
f98998ab
...
@@ -19,6 +19,17 @@
...
@@ -19,6 +19,17 @@
font-weight
:
300
;
font-weight
:
300
;
}
}
a
{
color
:
#4078c0
;
text-decoration
:
none
;
}
.hljs
{
padding
:
20px
25px
;
background-color
:
#f9fafc
;
margin-bottom
:
25px
;
}
.main-cnt
{
.main-cnt
{
margin-top
:
-80px
;
margin-top
:
-80px
;
padding
:
80px
0
120px
;
padding
:
80px
0
120px
;
...
...
examples/components/header.vue
View file @
f98998ab
...
@@ -111,7 +111,7 @@
...
@@ -111,7 +111,7 @@
<li
class=
"nav-item"
>
<li
class=
"nav-item"
>
<router-link
<router-link
active-class=
"active"
active-class=
"active"
to=
"/component/
button
"
to=
"/component/
layout
"
exact
>
组件
exact
>
组件
</router-link>
</router-link>
</li>
</li>
...
...
examples/docs/development.md
View file @
f98998ab
待补充
## 开发指南
\ No newline at end of file
### 构建工具安装
element 是基于
[
cooking
](
http://cookingjs.github.io/
)
进行构建开发的。所以运行前你需要全局安装
[
cooking
](
http://cookingjs.github.io/
)
。
```
bash
$
npm
install
cooking
-g
```
### 命令
```
bash
$
make
install
---
安装依赖
$
make new <component-name>
[
中文名]
---
创建新组件 package. 例如
'$ make new button 按钮'
$
make dev
---
开发模式
$
make dist
---
编译项目,生成目标文件
$
make dist-all
---
分别编译每个组件项目
$
make deploy
---
部署 demo
$
make pub
---
发布到 npm 上
$
make pub-all
---
发布各组件到 npm 上
```
examples/docs/quickstart.md
View file @
f98998ab
## 快速上手
element 是为饿了么定制的一套 Vue.js 后台组件库。帮助你更轻松更快速的开发后台项目。
element 是为饿了么定制的一套 Vue.js 后台组件库。帮助你更轻松更快速的开发后台项目。
-------------
### 安装
```
bash
$
npm
install
element-ui
-S
```
### 注册组件
引入整个 element
```
javascript
import
Vue
from
'
vue
'
import
Element
from
'
element-ui
'
Vue
.
use
(
Element
)
```
或者只引入你需要的组件
**use [babel-plugin-component](https://github.com/QingWei-Li/babel-plugin-component)**
```
javascript
import
{
Select
,
Button
// ...
}
from
'
element-ui
'
Vue
.
component
(
Select
.
name
,
ElSelect
)
Vue
.
component
(
Button
.
name
,
Button
)
```
(roughly) to
```
javascript
import
Select
from
'
element-ui/lib/select
'
;
import
Select
from
'
element-ui/lib/theme-default/select.css
'
;
import
Button
from
'
element-ui/lib/button
'
;
import
Button
from
'
element-ui/lib/theme-default/button.css
'
;
Vue
.
component
(
Select
.
name
,
ElSelect
)
Vue
.
component
(
Button
.
name
,
Button
)
```
### babel-plugin-component
## 安装
.babelrc
待补充
```
json
{
"plugins"
:
[
"xxx"
,
[
"component"
,
[
{
"libraryName"
:
"element-ui"
,
"styleLibraryName"
:
"theme-default"
}
]]]
}
```
examples/pages/index.vue
View file @
f98998ab
...
@@ -87,7 +87,6 @@
...
@@ -87,7 +87,6 @@
left
:
0
;
left
:
0
;
background-color
:
#fff
;
background-color
:
#fff
;
border-radius
:
0
0
5px
5px
;
border-radius
:
0
0
5px
5px
;
box-shadow
:
0px
6px
18px
0px
rgba
(
232
,
237
,
250
,
0.50
);
transition
:
all
.3s
;
transition
:
all
.3s
;
text-decoration
:
none
;
text-decoration
:
none
;
display
:
block
;
display
:
block
;
...
@@ -100,6 +99,7 @@
...
@@ -100,6 +99,7 @@
}
}
&
:hover
{
&
:hover
{
bottom
:
6px
;
bottom
:
6px
;
box-shadow
:
0px
6px
18px
0px
rgba
(
232
,
237
,
250
,
0.50
);
}
}
}
}
</
style
>
</
style
>
...
@@ -110,7 +110,7 @@
...
@@ -110,7 +110,7 @@
<div
class=
"banner-desc"
>
<div
class=
"banner-desc"
>
<h2>
Element
</h2>
<h2>
Element
</h2>
<div
id=
"source"
style=
"display: none;"
ref=
"type-source"
>
<div
id=
"source"
style=
"display: none;"
ref=
"type-source"
>
快速搭建页面
<br/>
只为这样的你:
<span
data-type=
"back"
ref=
"type-job"
>
设计师
</span>
快速搭建页面
<br/>
只为这样的你:
<span
data-type=
"back"
ref=
"type-job"
>
设计师
</span>
</div>
</div>
<div
id=
"output-wrap"
>
<div
id=
"output-wrap"
>
<span
id=
"output"
ref=
"type-output"
></span>
<span
id=
"output"
ref=
"type-output"
></span>
...
@@ -141,7 +141,7 @@
...
@@ -141,7 +141,7 @@
<p>
使用组件 Demo 快速体验交互细节;使用前端框架封装的代码帮助工程师快速开发。
</p>
<p>
使用组件 Demo 快速体验交互细节;使用前端框架封装的代码帮助工程师快速开发。
</p>
<router-link
<router-link
active-class=
"active"
active-class=
"active"
to=
"/component/
button
"
to=
"/component/
layout
"
exact
>
查看详情
exact
>
查看详情
</router-link>
</router-link>
</div>
</div>
...
...
package.json
View file @
f98998ab
...
@@ -14,6 +14,10 @@
...
@@ -14,6 +14,10 @@
"gh-docs"
:
"cooking build -c scripts/cooking.demo.js -p && gh-pages -d examples/element-ui --remote origin"
,
"gh-docs"
:
"cooking build -c scripts/cooking.demo.js -p && gh-pages -d examples/element-ui --remote origin"
,
"prepublish"
:
"make dist"
"prepublish"
:
"make dist"
},
},
"faas"
:
{
"domain"
:
"element"
,
"public"
:
"examples/element-ui"
},
"repository"
:
{
"repository"
:
{
"type"
:
"git"
,
"type"
:
"git"
,
"url"
:
"git@github.com:eleme/element-ui.git"
"url"
:
"git@github.com:eleme/element-ui.git"
...
...
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