mpvue
mpvue copied to clipboard
自定义表单组件v-model无效?
子组件:
<div>
<input :value="value" @input='onChange' />
</div>
<script>
export default {
methods: {
onChange(e) {
this.$emit('change', e.mp.detail.value)
}
}
}
</script>
父组件:
<son v-model='userInfo.name' />