vue子组件向父组件传递参数的基本方式

it2022-05-05  110

子组件: this.$emit('transferUrl', this.picUrl) 父组件: 引入子组件<pics @transferUrl="gettransferUrl"></pics> 获取参数: gettransferUrl (msg) { //把子组件传递过来的参数,在父组件中庸父组件定义的字段来接受 this.imageUrl = msg },

转载于:https://www.cnblogs.com/songdongdong/p/7120923.html


最新回复(0)