mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
feat(Button): add chooseavatar event (#4976)
This commit is contained in:
parent
878814c98f
commit
6997c225a9
@ -25,6 +25,7 @@
|
||||
binderror="onError"
|
||||
bindlaunchapp="onLaunchApp"
|
||||
bindopensetting="onOpenSetting"
|
||||
bindchooseavatar="onChooseAvatar"
|
||||
>
|
||||
<block wx:if="{{ loading }}">
|
||||
<van-loading
|
||||
|
@ -46,5 +46,13 @@ export const button = Behavior({
|
||||
onOpenSetting(event: WechatMiniprogram.ButtonOpenSetting) {
|
||||
this.triggerEvent('opensetting', event.detail);
|
||||
},
|
||||
|
||||
onChooseAvatar(
|
||||
event: WechatMiniprogram.CustomEvent<
|
||||
WechatMiniprogram.GeneralCallbackResult & { avatarUrl: string }
|
||||
>
|
||||
) {
|
||||
this.triggerEvent('chooseavatar', event.detail);
|
||||
},
|
||||
},
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user