update readme

update readme
This commit is contained in:
梁灏 2016-11-14 14:31:00 +08:00
parent e462d3c906
commit e48950bdeb

View file

@ -31,36 +31,30 @@
### Install vue-webpack project in the first place ### Install vue-webpack project in the first place
Use [vue-vueRouter-webpack](https://github.com/icarusion/vue-vueRouter-webpack)(Recommended) Or [vue-cli](https://github.com/vuejs/vue-cli) Use [iview-project](https://github.com/iview/iview-project)(Recommended) Or [vue-cli](https://github.com/vuejs/vue-cli)
### Install iView ### Install iView
```bash ```bash
// using npm
npm install iview --save npm install iview --save
``` // using script tag for global use
<script type="text/javascript" src="iview.min.js"></script>
### Babel support for iView in webpack
```js
module: {
loaders: [
{ test: /iview.src.*?js$/, loader: 'babel' },
{ test: /\.js$/, loader: 'babel', exclude: /node_modules/ }
]
}
``` ```
## Usage ## Usage
Use component as required
```html ```html
<template> <template>
<Page :current="1" :total="100"></Page> <Slider :value.sync="value" range></Slider>
</template> </template>
<script> <script>
import { Page } from 'iview';
export default { export default {
components: { Page } data () {
return {
value: [20, 50]
}
}
} }
</script> </script>
``` ```