1.0.1 • Published 7 years ago
vue-slider-control v1.0.1
liuliuliu
精致滑动组件,大佬用了都说好!
Build Setup
价格,时间等区间控制,精简小巧,十分耐用,让人爱不释手
npm install vue-slider-control --save
<p>{{result.percentage}}</p>
<p>{{result.min}}-{{result.max}}</p>
<vue-slider-control :max="max" @getVal="getVal">
<span slot="left">left</span>
<span slot="right">right</span>
</vue-slider-control>
import vueSliderControl from 'vue-slider-control'
export default {
data () {
return {
max: 1800, //设置最大值
result: {min: 0, max: 1800, percentage: '100%'}
}
},
components: { vueSliderControl },
methods: {
getVal (val) {
this.result = val //返回结果,val包含min,max,percentage三个值
}
}
}
For detailed explanation on how things work, checkout the guide and docs for vue-loader.