From 1b5d04f640b5531bfbfd4b5e34465f72b5658915 Mon Sep 17 00:00:00 2001 From: PengBoUESTC Date: Sat, 30 Sep 2023 01:17:28 +0000 Subject: [PATCH] refactor(types): sync components types --- packages/taro-components/types/Button.d.ts | 66 ++++++++++++++++++- packages/taro-components/types/Canvas.d.ts | 22 +++---- packages/taro-components/types/GridView.d.ts | 2 +- packages/taro-components/types/ListView.d.ts | 2 +- .../taro-components/types/NativeSlot.d.ts | 8 ++- .../taro-components/types/ScrollView.d.ts | 30 ++++++++- .../taro-components/types/ShareElement.d.ts | 6 +- packages/taro-components/types/Slot.d.ts | 8 ++- packages/taro-components/types/Snapshot.d.ts | 16 +++++ .../taro-components/types/StickyHeader.d.ts | 2 +- .../taro-components/types/StickySection.d.ts | 2 +- packages/taro-components/types/Textarea.d.ts | 2 +- packages/taro-components/types/Video.d.ts | 5 +- packages/taro-components/types/index.d.ts | 13 ++-- .../taro-components/types/index.vue3.d.ts | 55 +++++++++++----- 15 files changed, 184 insertions(+), 55 deletions(-) create mode 100644 packages/taro-components/types/Snapshot.d.ts diff --git a/packages/taro-components/types/Button.d.ts b/packages/taro-components/types/Button.d.ts index a2489e44f5f1..159149edb8f3 100644 --- a/packages/taro-components/types/Button.d.ts +++ b/packages/taro-components/types/Button.d.ts @@ -127,7 +127,9 @@ interface ButtonProps extends StandardProps { * @supported swan */ subscribeId?: string - /** 打开群资料卡时,传递的群号 + /** 群聊 id + * @qq 打开群资料卡时,传递的群号 + * @tt 通过创建聊天群、查询群信息获取 * @supported qq */ groupId?: string @@ -277,7 +279,11 @@ declare namespace ButtonProps { reset } /** open-type 的合法值 */ - type OpenType = keyof openTypeKeys['weapp'] | keyof openTypeKeys['alipay'] | keyof openTypeKeys['qq'] + type OpenType = + | keyof openTypeKeys['weapp'] + | keyof openTypeKeys['alipay'] + | keyof openTypeKeys['qq'] + | keyof openTypeKeys['tt'] /** open-type 的合法值 */ interface openTypeKeys { weapp: { @@ -293,6 +299,11 @@ declare namespace ButtonProps { * @see https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/getPhoneNumber.html */ getPhoneNumber + /** + * 手机号实时验证,向用户申请,并在用户同意后,快速填写和实时验证手机号。(*小程序插件中不能使用*) + * @see https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/getRealtimePhoneNumber.html + */ + getRealtimePhoneNumber /** 获取用户信息,可以从回调中获取到用户信息 */ getUserInfo /** 打开APP,可以通过 app-parameter 属性设定向APP传的参数 @@ -305,6 +316,25 @@ declare namespace ButtonProps { feedback /** 获取用户头像,可以从回调中获得具体信息 */ chooseAvatar + /** + * 用户同意隐私协议按钮。可通过 bindagreeprivacyauthorization 监听用户同意隐私协议事件 + */ + agreePrivacyAuthorization + /** + * 从基础库 2.32.3 版本起,隐私同意按钮支持与手机号快速验证组件耦合使用,调用方式为: + *