diff --git a/src/uni_modules/wot-design-uni/components/wd-button/wd-button.vue b/src/uni_modules/wot-design-uni/components/wd-button/wd-button.vue index b9410f18..f87e9424 100644 --- a/src/uni_modules/wot-design-uni/components/wd-button/wd-button.vue +++ b/src/uni_modules/wot-design-uni/components/wd-button/wd-button.vue @@ -33,6 +33,8 @@ @error="handleError" @launchapp="handleLaunchapp" @opensetting="handleOpensetting" + @chooseavatar="handleChooseavatar" + @agreeprivacyauthorization="handleAgreePrivacyAuthorization" > @@ -123,7 +125,17 @@ const loadingStyle = computed(() => { return `background-image: url(${loadingIconSvg.value});` }) -const emit = defineEmits(['click', 'getuserinfo', 'contact', 'getphonenumber', 'error', 'launchapp', 'opensetting']) +const emit = defineEmits([ + 'click', + 'getuserinfo', + 'contact', + 'getphonenumber', + 'error', + 'launchapp', + 'opensetting', + 'chooseavatar', + 'agreeprivacyauthorization' +]) function handleClick(event) { if (!props.disabled && !props.loading) { @@ -154,6 +166,14 @@ function handleLaunchapp(event) { function handleOpensetting(event) { emit('opensetting', event.detail) } + +function handleChooseavatar(event) { + emit('chooseavatar', event.detail) +} + +function handleAgreePrivacyAuthorization(event) { + emit('agreeprivacyauthorization', event.detail) +} function buildLoadingSvg() { const { loadingColor, type, plain } = props let color = loadingColor