父组件:
<air-number-dropdown v-model="tempval" title="温度补偿"></air-number-dropdown>
子组件:
<ei-number-dropdown v-model="value" @onchange="change"></ei-number-dropdown>
<script>
export default {
name: "air-number-dropdown",
props: {
modelValue: {
type: String
}
},
methods: {
change(value) {
this.$emit("update:modelValue",value)
}
},
computed: {
value() {
return this.modelValue
}
}
}
</script>