vue3 子组件修改父组件的两种方法
<jdy-goods-attr
:goods_sn="goods.goods_sn"
@goods_sn="(msg) => goods.goods_sn = msg"
v-model:goods_num="goods.goods_num"
></jdy-goods-attr>
const emit = defineEmits(['goods_sn','update:goods_num']);
//方法一
emit('goods_sn',sn.value)
//方法二
emit('update:goods_num',num.value)