2016-07-27 06:15:02 +00:00
# Element
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'
Vue.component(Select.name, ElSelect)
2016-09-05 04:33:21 +00:00
Vue.component(Button.name, ElButton)
2016-07-27 06:15:02 +00:00
```
(roughly) to
``` javascript
import Vue from 'vue'
import Element from 'element-ui'
import 'element-ui/lib/theme-default/index.css';
Vue.use(Element)
// or
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)
2016-09-05 04:33:21 +00:00
Vue.component(Button.name, ElButton)
2016-07-27 06:15:02 +00:00
```
## babel-plugin-component
.babelrc
```json
{
"plugins": ["xxx", ["component", [
{
"libraryName": "element-ui",
"styleLibraryName": "theme-default"
}
]]]
}
```
2016-09-03 12:30:59 +00:00
## development
### Building Tool Installation
Element UI is built with [cooking ](http://cookingjs.github.io/ ). So before running it you'll need to install [cooking ](http://cookingjs.github.io/ ) globally.
```bash
$ npm install cooking -g
```
### Commands
```bash
$ make install --- install dependencies
$ make dev --- develop mode
$ make dist --- compile the project
$ make dist-all --- compile each component individually
```
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-07-27 06:15:02 +00:00
## LICENSE
MIT
2016-09-01 06:17:01 +00:00
<!-- [](https://travis-ci.org/ElemeFE/element-ui) [](https://www.npmjs.org/package/element-ui) [](https://npmjs.org/package/element-ui) -->