vuejs / jsx-vue2

monorepo for Babel / Vue JSX related packages
https://jsx-vue2-playground.netlify.app/
1.47k stars 96 forks source link

jsx with elementui el-upload in render ,can not work well at on-** function #54

Open chengzhangHu opened 5 years ago

chengzhangHu commented 5 years ago
  1. getSingUpload(pitem){ let self = this; let res; console.log("base url....single...",self.baseUrl); res = (

        );
        return res;
    }

    2.render() call getSingUpload() 3.upload file

  2. on-success can not work well together
chengzhangHu commented 5 years ago

myable the reason is jsx ,deal with on-success to be an success event. can not work with elemtn onSuccess

chengzhangHu commented 5 years ago

目前同事协助,通过查看webpack打包后文件,jsx转换vue,el-upload属性,确实被转换为success事件的监听了。目前解决方案,独立成一个组件,然后引入render()

xhp12138 commented 2 years ago

试试 props={{ onSuccess: () => {} }}