update readme
update readme
This commit is contained in:
parent
e462d3c906
commit
e48950bdeb
1 changed files with 10 additions and 16 deletions
26
README.md
26
README.md
|
@ -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>
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Reference in a new issue