子组件this.$emit('input', value)时
在支付宝小程序中父组件在@input中接收到的数据是一个事件对象而不是value,
而在h5中接收到的是value
子组件
model: {
prop: 'value',
event: 'input'
},
methods: {
onTap(value) {
this.$emit('input', value);
}
}
子组件this.$emit('input', value)时
在支付宝小程序中父组件在@input中接收到的数据是一个事件对象而不是value,
而在h5中接收到的是value
子组件
model: {
prop: 'value',
event: 'input'
},
methods: {
onTap(value) {
this.$emit('input', value);
}
}
0 个回复