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

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-03
  • 2022-12-23
  • 2022-12-23
  • 2021-07-05
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-25
相关资源
相似解决方案