<template>
<view>
<yichan-movable-area :defaultValue="defaultValue" :max="max" :min="min" @change="onChange" />
</view>
</template>
<script>
import YiChanMovableArea from '../../components/yichan-movable-area/yichan-movable-area.vue';
export default {
components: {
YiChanMovableArea
},
data() {
max: 10,
min: 0,
defaultValue: 6,
},
methods: {
onChange(score) {
console.log(score)
this.score = score
},
}
}
</script>
属性名 | 类型 | 默认值 | 说明 |
---|---|---|---|
min | Number | 最小值 | 0 |
max | Number | 最大值 | 0 |
defaultValue | Number | 默认值 | 0 |
函数名 | 说明 | 返回值 |
---|---|---|
change | 拖动时触发 | 返回当前选择的数值 |