After rendering the component using the render function in iview, the child component sends the method through $emit, how to receive this method in the parent component.

render upload components in render in parent component

    render: (h, params) => {
          return h("div", [
                  h(upload, {
                         props: {
                              uploadId: "upload_"+params.index+"_img",
                              defaultData: [],
                              fileList: [],
                          },
                    })
             ])
       }   

use the $emit passing method in the subcomponent

this.$emit ("getUploadDatas",datas)

excuse me, how to receive the getUploadDatas method in the parent component? many methods are useless. Thank you for the answer

.
Nov.05,2021

render: (h, params) = > {

      return h('div', [
              h(upload, {
                     props: {
                          uploadId: 'upload_'+params.index+'_img',
                          defaultData: [],
                          fileList: [],
                      },
                      on: {
                          // $emit
                          getUploadDatas(){
                              // contents....
                          }
                      }
                })
         ])
   }   
  

final solution:

clipboard.png

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-1b3dd4a-2c3be.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-1b3dd4a-2c3be.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?