From cf573c29e2ded99c3263074128d11952cda5d275 Mon Sep 17 00:00:00 2001 From: AdvancedCat Date: Sat, 18 Nov 2023 01:21:15 +0000 Subject: [PATCH] refactor(types): sync components types --- packages/taro-components/types/Button.d.ts | 45 ++++++++++--------- packages/taro-components/types/Canvas.d.ts | 22 ++++----- .../taro-components/types/ChannelVideo.d.ts | 4 +- packages/taro-components/types/GridView.d.ts | 2 +- packages/taro-components/types/ListView.d.ts | 2 +- .../taro-components/types/LivePlayer.d.ts | 15 +++++-- packages/taro-components/types/Map.d.ts | 23 ++++++++-- .../taro-components/types/NativeSlot.d.ts | 8 ++-- .../taro-components/types/NavigationBar.d.ts | 6 +++ packages/taro-components/types/PageMeta.d.ts | 40 +++++++++++++++++ .../taro-components/types/ScrollView.d.ts | 26 ++++++++++- .../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 | 15 +++++-- packages/taro-components/types/index.d.ts | 13 +++--- .../taro-components/types/index.vue3.d.ts | 28 +++++++++--- 20 files changed, 211 insertions(+), 74 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 ed54669c6af2..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 @@ -165,10 +167,6 @@ interface ButtonProps extends StandardProps { * @supported qq */ shareMessageImg?: string - /** 跳转抖音号个人页,只支持小程序绑定的品牌号、员工号、合作号 - * @supported tt - */ - dataAwemeId?: string /** 用户点击该按钮时,会返回获取到的用户信息,回调的detail数据与 Taro.getUserInfo 返回的一致 * * 生效时机: `open-type="getUserInfo"` @@ -193,11 +191,6 @@ interface ButtonProps extends StandardProps { * @supported weapp, alipay, swan, tt, jd */ onGetPhoneNumber?: CommonEventFunction - /** - * 手机号实时验证回调,`open-type="getRealtimePhoneNumber"` 时有效 - * @supported weapp - */ - onGetRealTimePhoneNumber?: CommonEventFunction /** 当使用开放能力时,发生错误的回调 * * 生效时机:`open-type="launchApp"` @@ -222,11 +215,6 @@ interface ButtonProps extends StandardProps { * @supported weapp */ onChooseAvatar?: CommonEventFunction - /** - * 用户同意隐私协议事件回调,`open-type="agreePrivacyAuthorization"`时有效 - * @supported weapp - */ - onAgreePrivacyAuthorization?: CommonEventFunction /** 点击。 * 说明: 每点击一次会触发一次事件,建议自行使用代码防止重复点击,可以使用 js 防抖和节流实现。 * @supported alipay @@ -265,12 +253,6 @@ interface ButtonProps extends StandardProps { * @supported qq */ onAddGroupApp?: CommonEventFunction - /** 监听跳转抖音号个人页的回调 - * - * 生效时机:`open-type="openAwemeUserProfile"` - * @supported tt - */ - onOpenAwemeUserProfile?: CommonEventFunction } declare namespace ButtonProps { /** size 的合法值 */ @@ -297,7 +279,11 @@ declare namespace ButtonProps { reset } /** open-type 的合法值 */ - type OpenType = keyof openTypeKeys['weapp'] | keyof openTypeKeys['alipay'] | keyof openTypeKeys['qq'] | keyof openTypeKeys['tt'] + type OpenType = + | keyof openTypeKeys['weapp'] + | keyof openTypeKeys['alipay'] + | keyof openTypeKeys['qq'] + | keyof openTypeKeys['tt'] /** open-type 的合法值 */ interface openTypeKeys { weapp: { @@ -334,6 +320,21 @@ declare namespace ButtonProps { * 用户同意隐私协议按钮。可通过 bindagreeprivacyauthorization 监听用户同意隐私协议事件 */ agreePrivacyAuthorization + /** + * 从基础库 2.32.3 版本起,隐私同意按钮支持与手机号快速验证组件耦合使用,调用方式为: + *