|
33 | 33 | @error="handleError" |
34 | 34 | @launchapp="handleLaunchapp" |
35 | 35 | @opensetting="handleOpensetting" |
| 36 | + @chooseavatar="handleChooseavatar" |
| 37 | + @agreeprivacyauthorization="handleAgreePrivacyAuthorization" |
36 | 38 | > |
37 | 39 | <view v-if="loading" class="wd-button__loading"> |
38 | 40 | <view class="wd-button__loading-svg" :style="loadingStyle"></view> |
@@ -123,7 +125,17 @@ const loadingStyle = computed(() => { |
123 | 125 | return `background-image: url(${loadingIconSvg.value});` |
124 | 126 | }) |
125 | 127 |
|
126 | | -const emit = defineEmits(['click', 'getuserinfo', 'contact', 'getphonenumber', 'error', 'launchapp', 'opensetting']) |
| 128 | +const emit = defineEmits([ |
| 129 | + 'click', |
| 130 | + 'getuserinfo', |
| 131 | + 'contact', |
| 132 | + 'getphonenumber', |
| 133 | + 'error', |
| 134 | + 'launchapp', |
| 135 | + 'opensetting', |
| 136 | + 'chooseavatar', |
| 137 | + 'agreeprivacyauthorization' |
| 138 | +]) |
127 | 139 |
|
128 | 140 | function handleClick(event) { |
129 | 141 | if (!props.disabled && !props.loading) { |
@@ -154,6 +166,14 @@ function handleLaunchapp(event) { |
154 | 166 | function handleOpensetting(event) { |
155 | 167 | emit('opensetting', event.detail) |
156 | 168 | } |
| 169 | +
|
| 170 | +function handleChooseavatar(event) { |
| 171 | + emit('chooseavatar', event.detail) |
| 172 | +} |
| 173 | +
|
| 174 | +function handleAgreePrivacyAuthorization(event) { |
| 175 | + emit('agreeprivacyauthorization', event.detail) |
| 176 | +} |
157 | 177 | function buildLoadingSvg() { |
158 | 178 | const { loadingColor, type, plain } = props |
159 | 179 | let color = loadingColor |
|
0 commit comments