add Slider component

add Slider component
This commit is contained in:
梁灏 2016-11-11 15:08:12 +08:00
parent 3a2c6fc75a
commit 69576f47f4
15 changed files with 473 additions and 27 deletions

View file

@ -29,7 +29,7 @@
Modal
},
props: {
},
data () {
return {

View file

@ -1,7 +1,12 @@
<template>
<Slider :value="10" :tip-format="format">
</Slider>
<div style="width: 400px;margin:100px;">
{{ value }}
<Slider @on-change="change" :step="10" show-stops></Slider>
<Slider :value.sync="value" show-input range @on-change="change" :step="13"></Slider>
<!--<Slider :max="10"></Slider>-->
<!--<Slider :step="13"></Slider>-->
<!--<Slider :step="13" :max="60"></Slider>-->
</div>
</template>
<script>
import { Slider } from 'iview';
@ -9,12 +14,15 @@
components: { Slider },
data () {
return {
value: [20, 50]
}
},
methods: {
format (val) {
return `进度:${val}%`
},
change (data) {
console.log(data)
}
}
}