获取头像按钮点了无效, onChooseAvatar好像没有触发 ?
<view class="user-bar"> <button class="avatar" open-type="chooseAvatar" bind:chooseavatar="onChooseAvatar"> <image class="avatar-img" src="{{avatarUrl}}"></image> </button> </view> onChooseAvatar(e) { console.log("更换头像", e.detail.avatarUrl) const { avatarUrl } = e.detail this.setData({ avatarUrl, }) }, 编译时的模拟界面可以用,但预览和真机调试下,点button都没任何反应,log也没有