mirror of
https://gitee.com/wot-design-uni/wot-design-uni.git
synced 2025-12-06 17:18:40 +08:00
feat: ✨ button组件支持微信小程序的getrealtimephonenumber 事件 (#1097)
This commit is contained in:
parent
9585db1150
commit
ed412b6726
@ -155,6 +155,7 @@
|
|||||||
| getUserInfo | 获取用户信息,可以从@getuserinfo 回调中获取到用户信息 |
|
| getUserInfo | 获取用户信息,可以从@getuserinfo 回调中获取到用户信息 |
|
||||||
| contact | 打开客服会话,如果用户在会话中点击消息卡片后返回应用,可以从 @contact 回调中获得具体信息 |
|
| contact | 打开客服会话,如果用户在会话中点击消息卡片后返回应用,可以从 @contact 回调中获得具体信息 |
|
||||||
| getPhoneNumber | 获取用户手机号,可以从@getphonenumber 回调中获取到用户信息 |
|
| getPhoneNumber | 获取用户手机号,可以从@getphonenumber 回调中获取到用户信息 |
|
||||||
|
| getRealtimePhoneNumber | 获取用户手机号,可以从@getrealtimephonenumber 回调中获取到用户信息 |
|
||||||
| launchApp | 小程序中打开 APP,可以通过 app-parameter 属性设定向 APP 传的参数 |
|
| launchApp | 小程序中打开 APP,可以通过 app-parameter 属性设定向 APP 传的参数 |
|
||||||
| openSetting | 打开授权设置页 |
|
| openSetting | 打开授权设置页 |
|
||||||
| chooseAvatar | 获取用户头像,可以从@chooseavatar 回调中获取到头像信息 |
|
| chooseAvatar | 获取用户头像,可以从@chooseavatar 回调中获取到头像信息 |
|
||||||
@ -171,6 +172,7 @@
|
|||||||
| getuserinfo | 获取用户信息 | `detail` | - |
|
| getuserinfo | 获取用户信息 | `detail` | - |
|
||||||
| contact | 客服消息回调,open-type="contact"时有效 | `detail` | - |
|
| contact | 客服消息回调,open-type="contact"时有效 | `detail` | - |
|
||||||
| getphonenumber | 获取用户手机号回调,open-type=getPhoneNumber 时有效 | `detail` | - |
|
| getphonenumber | 获取用户手机号回调,open-type=getPhoneNumber 时有效 | `detail` | - |
|
||||||
|
| getrealtimephonenumber | 实时获取用户手机号回调,open-type=getRealtimePhoneNumber 时有效 | `detail` | - |
|
||||||
| error | 当使用开放能力时,发生错误的回调,open-type=launchApp 时有效 | `detail` | - |
|
| error | 当使用开放能力时,发生错误的回调,open-type=launchApp 时有效 | `detail` | - |
|
||||||
| launchapp | 打开 APP 成功的回调,open-type=launchApp 时有效 | `detail` | - |
|
| launchapp | 打开 APP 成功的回调,open-type=launchApp 时有效 | `detail` | - |
|
||||||
| opensetting | 在打开授权设置页后回调,open-type=openSetting 时有效 | `detail` | - |
|
| opensetting | 在打开授权设置页后回调,open-type=openSetting 时有效 | `detail` | - |
|
||||||
|
|||||||
@ -20,6 +20,7 @@ export type ButtonOpenType =
|
|||||||
| 'getUserInfo'
|
| 'getUserInfo'
|
||||||
| 'contact'
|
| 'contact'
|
||||||
| 'getPhoneNumber'
|
| 'getPhoneNumber'
|
||||||
|
| 'getRealtimePhoneNumber'
|
||||||
| 'launchApp'
|
| 'launchApp'
|
||||||
| 'openSetting'
|
| 'openSetting'
|
||||||
| 'chooseAvatar'
|
| 'chooseAvatar'
|
||||||
|
|||||||
@ -32,6 +32,7 @@
|
|||||||
@getuserinfo="handleGetuserinfo"
|
@getuserinfo="handleGetuserinfo"
|
||||||
@contact="handleConcat"
|
@contact="handleConcat"
|
||||||
@getphonenumber="handleGetphonenumber"
|
@getphonenumber="handleGetphonenumber"
|
||||||
|
@getrealtimephonenumber="handleGetrealtimephonenumber"
|
||||||
@error="handleError"
|
@error="handleError"
|
||||||
@launchapp="handleLaunchapp"
|
@launchapp="handleLaunchapp"
|
||||||
@opensetting="handleOpensetting"
|
@opensetting="handleOpensetting"
|
||||||
@ -81,6 +82,7 @@ const emit = defineEmits([
|
|||||||
'getuserinfo',
|
'getuserinfo',
|
||||||
'contact',
|
'contact',
|
||||||
'getphonenumber',
|
'getphonenumber',
|
||||||
|
'getrealtimephonenumber',
|
||||||
'error',
|
'error',
|
||||||
'launchapp',
|
'launchapp',
|
||||||
'opensetting',
|
'opensetting',
|
||||||
@ -134,6 +136,10 @@ function handleGetphonenumber(event: any) {
|
|||||||
emit('getphonenumber', event.detail)
|
emit('getphonenumber', event.detail)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleGetrealtimephonenumber(event: any) {
|
||||||
|
emit('getrealtimephonenumber', event.detail)
|
||||||
|
}
|
||||||
|
|
||||||
function handleError(event: any) {
|
function handleError(event: any) {
|
||||||
emit('error', event.detail)
|
emit('error', event.detail)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user