Mini Program development encountered a problem: how to pass the value of the child component to the parent component

Component({
  properties: {}
  methods: {
    onTap: function(){
      var myEventDetail = {} // detail
      var myEventOption = {} // 
      this.triggerEvent("myevent", myEventDetail, myEventOption)
    }
  }
})

this is a custom event given in the official document, which is triggered by triggerEvent, so if I want to pass a custom component parameter to this" myevent", I don"t seem to see the method.


Component

Component({
  properties: {},

  data: {
    info:''
  },

  methods: {
    modalClear:function(){
      let myEventDetail = this.data.info;
      this.triggerEvent('myevent',myEventDetail,{bubbles:false});
    }
  }
})

index.wxml

//
<my-component modal-hidden="{{is_modal_Hidden}}" modal-msg="{{is_modal_msg}}" bind:myevent='onMyevent'></my-component>

index.js

  onMyevent:function(e){
    console.log(e.detail);
  }

clipboard.png


are you talking about listening for event delivery?
this.triggerEvent ('myevent', {myEventDetail, myEventOption})

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b9bd83-117f9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b9bd83-117f9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?