vue子组件传值父组件,父组件传值子组件

this.$emit:子组件传值父组件
this.$refs:父组件传值子组件
子组件传值父组件
this.$emit('getOrderDetailsList',InventoryInfo.orderDetailsList)
父组件传值子组件
 <FormInfo ref="formInfo"  @getOrderDetailsList="orderDetailsList" />
orderDetailsList( res){
      this.$refs[' formSKUInfo'].setData( res);
    },
formSKUInfo:子组件接收的值
res:子组件传给父组件的值
 
 

猜你喜欢

转载自www.cnblogs.com/wssdx/p/12074202.html