Props
Demo
基本使用
``` vux width=100% height=220px components=Group,Cell,Range
</template>
export default { data () { return { value1: 0, value2: 0, value3: 20 } } }
### 设置起始值和最大值
``` vux width=100% height=210px components=Group,Cell,Range
<template>
<group>
<cell title="min=8" :inline-desc="'value is: '+value1" primary="content">
<range slot="value" :value.sync="value1" :min=8></range>
</cell>
<cell title="max=88" :inline-desc="'value is: '+value2" primary="content">
<range slot="value" :value.sync="value2" :max=88></range>
</cell>
<cell title="min and max" :inline-desc="'value is: '+value3" primary="content">
<range slot="value" :value.sync="value3" :min=7 :max=77></range>
</cell>
</group>
</template>
<script>
export default {
data () {
return {
value1: 25,
value2: 25,
value3: 25
}
}
}
</script>
自定义步长
``` vux width=100% height=100px components=Group,Cell,Range
</template>
export default { data () { return { value: 25 } } }
### 禁用组件
``` vux width=100% height=150px components=Group,Cell,Range
<template>
<group>
<cell title="disabled=true" :inline-desc="'valus is: '+value1" primary="content">
<range slot="value" :value.sync="value1" disabled></range>
</cell>
<cell title="Opacity" :inline-desc="'valus is: '+value2" primary="content">
<range slot="value" :value.sync="value2" disabled :disabled-opacity=0.1></range>
</cell>
</group>
</template>
<script>
export default {
data () {
return {
value1: 25,
value2: 25
}
}
}
</script>
设置bar的高度和手柄的位置
``` vux width=100% height=150px components=Group,Cell,Range
</template>
export default { data () { return { value: 25 } } }
### 自定义初始值和最大值
``` vux width=100% height=150px components=Group,Cell,Range
<template>
<group>
<cell title="文字大小" :inline-desc="'font size: ' + value1" primary="content">
<range slot="value" :value.sync="value1" :min="12" :max="22" min-HTML="<span style='font-size:12px;'>小</span>" max-HTML="<span style='font-size:22px;'>大</span>"></range>
</cell>
<cell title="bcontentness" :inline-desc="'value is: ' + value2 + '%'" primary="content">
<range slot="value" :value.sync="value2" min-HTML="<span style='font-size:16px;color:#F90;'>☼</span>" max-HTML="<span style='font-size:30px;color:#F90;'>☼</span>"></range>
</cell>
</group>
</template>
<script>
export default {
data () {
return {
value1: 14,
value2: 25
}
}
}
</script>
双向绑定
``` vux width=100% height=150px components=Group,Cell,Range
</template>
export default { data () { return { value: 0 } } } ```