2016-09-07 07:38:19 +00:00
# Element [![Build Status](https://travis-ci.org/ElemeFE/element.svg?branch=master)](https://travis-ci.org/ElemeFE/element) [![npm package](https://img.shields.io/npm/v/element-ui.svg)](https://www.npmjs.org/package/element-ui) [![NPM downloads](http://img.shields.io/npm/dm/element-ui.svg)](https://npmjs.org/package/element-ui)
2016-09-05 04:33:21 +00:00
> Desktop UI elements for Vue.js 2.0.
2016-07-27 06:15:02 +00:00
2016-09-03 12:30:59 +00:00
## Docs
2016-09-03 13:17:53 +00:00
Coming soon
2016-09-03 12:30:59 +00:00
## Demo
2016-09-05 04:33:21 +00:00
Demo will come with the documentation. Here is a preview of what a page based on Element looks like:
2016-09-03 12:30:59 +00:00
< img src = "./examples/assets/images/element-demo.jpeg" width = "100%" / >
2016-07-27 06:15:02 +00:00
## Usages
```shell
2016-09-03 12:30:59 +00:00
npm install element-ui@next
2016-07-27 06:15:02 +00:00
```
## Quick Start
use [babel-plugin-component ](https://github.com/QingWei-Li/babel-plugin-component )
``` javascript
import Vue from 'vue'
import Element from 'element-ui'
Vue.use(Element)
// or
import {
Select,
Button
// ...
} from 'element-ui'
2016-09-06 04:01:53 +00:00
Vue.component(Select.name, Select)
Vue.component(Button.name, Button)
2016-07-27 06:15:02 +00:00
```
(roughly) to
``` javascript
import Vue from 'vue'
import Element from 'element-ui'
2016-09-07 07:11:50 +00:00
import 'element-ui/lib/theme-default/index.css'
2016-07-27 06:15:02 +00:00
Vue.use(Element)
// or
2016-09-07 07:11:50 +00:00
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'
2016-07-27 06:15:02 +00:00
2016-09-06 04:01:53 +00:00
Vue.component(Select.name, Select)
Vue.component(Button.name, Button)
2016-07-27 06:15:02 +00:00
```
## babel-plugin-component
.babelrc
```json
{
"plugins": ["xxx", ["component", [
{
"libraryName": "element-ui",
"styleLibraryName": "theme-default"
}
]]]
}
```
2016-09-07 07:38:19 +00:00
## Development
Recommend: node >= 4 npm >= 3
2016-09-06 03:51:08 +00:00
```shell
# development => install packages -> build icon etc. -> run webpack
$ npm run dev
2016-09-03 12:30:59 +00:00
2016-09-06 03:51:08 +00:00
# Recommended use `npminstall` to install packages, it is so fast
$ npm i npminstall -g
$ npminstall
2016-09-03 12:30:59 +00:00
2016-09-06 03:51:08 +00:00
# build => build all component
$ npm run dist
2016-09-03 12:30:59 +00:00
```
2016-09-01 06:17:01 +00:00
## Changelog
2016-09-03 12:30:59 +00:00
Details changes for each release are documented in the [release notes ](https://github.com/ElemeFE/element/releases ).
2016-09-01 06:17:01 +00:00
2016-09-07 04:40:16 +00:00
## Contribution
2016-09-07 07:11:50 +00:00
Please make sure to read the [Contributing Guide ](https://github.com/ElemeFE/element/blob/master/.github/CONTRIBUTING.md ) before making a pull request.
2016-09-07 04:40:16 +00:00
2016-07-27 06:15:02 +00:00
## LICENSE
MIT
2016-09-01 06:17:01 +00:00