Open dong-lufei opened 1 year ago
rax官方未更新,我是用下面的方法临时解决的。 手动在小程序编译后文件(build/wechat-miniprogram)根目录 render.js\root.wxml 这两个文件添加以下代码。 root.wxml 文件里搜索 onButton,找到对应 DOM 添加如下属性 bindchooseavatar="onButtonChooseAvatar" render.js 文件里搜索 onButton,找到对应数组里添加以下对象 { name: 'onButtonChooseAvatar', eventName: 'chooseAvatar' }
用onChooseavatar写事件好像失效。
需要支持微信小程序 open-type 头像获取:https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/userProfile.html 支持chooseAvatar回调