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
ef90ce3c
Commit
ef90ce3c
authored
Oct 28, 2016
by
杨奕
Committed by
GitHub
Oct 28, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #711 from QingWei-Li/fix/add-ignore-locale
doc: add ignore locale
parents
f6edf712
c20113dd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
5 deletions
+17
-5
README.md
README.md
+2
-1
examples/docs/zh-cn/quickstart.md
examples/docs/zh-cn/quickstart.md
+15
-4
No files found.
README.md
View file @
ef90ce3c
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
## Links
## Links
-
[
Home Page
](
http://element.eleme.io/
)
-
[
Home Page
](
http://element.eleme.io/
)
-
[
Docs
](
http://element.eleme.io/#/component
)
-
[
Docs
](
http://element.eleme.io/#/component
)
-
[
FAQ 中文
](
./FAQ.md
)
## Install
## Install
```
shell
```
shell
...
@@ -61,7 +62,7 @@ Vue.component(Button.name, Button)
...
@@ -61,7 +62,7 @@ Vue.component(Button.name, Button)
.babelrc
.babelrc
```
json
```
json
{
{
"plugins"
:
[
"xxx"
,
[
"component"
,
[
"plugins"
:
[[
"component"
,
[
{
{
"libraryName"
:
"element-ui"
,
"libraryName"
:
"element-ui"
,
"styleLibraryName"
:
"theme-default"
"styleLibraryName"
:
"theme-default"
...
...
examples/docs/zh-cn/quickstart.md
View file @
ef90ce3c
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
新建项目,项目结构为
新建项目,项目结构为
```
text
```
text
|- src/ --------------------- 项目源代码
|- src/ --------------------- 项目源代码
|- App.vue
--------------
|- App.vue
|- main.js -------------- 入口文件
|- main.js -------------- 入口文件
|- .babelrc ----------------- babel 配置文件
|- .babelrc ----------------- babel 配置文件
|- index.html --------------- HTML 模板
|- index.html --------------- HTML 模板
...
@@ -79,7 +79,7 @@ module.exports = {
...
@@ -79,7 +79,7 @@ module.exports = {
filename
:
'
build.js
'
filename
:
'
build.js
'
},
},
resolveLoader
:
{
resolveLoader
:
{
root
:
path
.
join
(
__dirname
,
'
node_modules
'
)
,
root
:
path
.
join
(
__dirname
,
'
node_modules
'
)
},
},
module
:
{
module
:
{
loaders
:
[
loaders
:
[
...
@@ -206,7 +206,7 @@ new Vue({
...
@@ -206,7 +206,7 @@ new Vue({
Element 组件内部默认使用中文,若希望使用其他语言,则需要进行多语言设置。以英文为例,在 main.js 中:
Element 组件内部默认使用中文,若希望使用其他语言,则需要进行多语言设置。以英文为例,在 main.js 中:
```
bash
```
javascript
// 完整引入 Element
// 完整引入 Element
import
Vue
from
'
vue
'
import
Vue
from
'
vue
'
import
ElementUI
from
'
element-ui
'
import
ElementUI
from
'
element-ui
'
...
@@ -217,7 +217,7 @@ Vue.use(ElementUI, { locale })
...
@@ -217,7 +217,7 @@ Vue.use(ElementUI, { locale })
或
或
```
bash
```
javascript
// 按需引入 Element
// 按需引入 Element
import
Vue
from
'
vue
'
import
Vue
from
'
vue
'
import
{
Button
,
Select
}
from
'
element-ui
'
import
{
Button
,
Select
}
from
'
element-ui
'
...
@@ -232,6 +232,17 @@ Vue.component(Button.name, Button)
...
@@ -232,6 +232,17 @@ Vue.component(Button.name, Button)
Vue
.
component
(
Select
.
name
,
Select
)
Vue
.
component
(
Select
.
name
,
Select
)
```
```
如果使用其它语言,默认情况下中文语言包依旧是被引入的,可以使用 webpack 的 IgnorePlugn 忽略掉它以减少打包后的文件体积。
webpack.config.js
```
javascript
{
plugins
:
[
new
webpack
.
IgnorePlugin
(
/element-ui
\/
lib
\/
locale
\/
lang
\/
zh-cn/
)
]
}
```
### 开始使用
### 开始使用
至此,一个基于 Vue 和 Element 的开发环境已经搭建完毕,现在就可以编写代码了。启动开发模式:
至此,一个基于 Vue 和 Element 的开发环境已经搭建完毕,现在就可以编写代码了。启动开发模式:
...
...
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