// 通过监听点击事件去判断是否触发change事件,如果没有则说明数据没变化
<van-rate v-model="modelValue" :disabled="!conf.isEditText" disabled-color="rgba(0,86,255,0.5)" :allow-half="conf['allow-half']" color="#0056FF" @change="changeRate" @click.native="changeValue" />
methods: {
changeRate() {
this.validClick = true
this.timer && clearTimeout(this.timer)
this.timer = null
},
changeValue() {
if(this.validClick) {
this.validClick = false
return
}
this.timer = setTimeout(() => {
this.modelValue = undefined
}, 80)
}
}