From c4f14a7f654a1c746e1e21507611add42012ad62 Mon Sep 17 00:00:00 2001 From: TheKonka Date: Sat, 9 Sep 2023 00:38:41 +0000 Subject: [PATCH] refactor(types): sync components types --- packages/taro-components/types/Button.d.ts | 26 ++++--------------- .../taro-components/types/NativeSlot.d.ts | 2 +- .../taro-components/types/ShareElement.d.ts | 4 --- packages/taro-components/types/Slot.d.ts | 2 +- 4 files changed, 7 insertions(+), 27 deletions(-) diff --git a/packages/taro-components/types/Button.d.ts b/packages/taro-components/types/Button.d.ts index ed54669c6af2..963b7eb33dcf 100644 --- a/packages/taro-components/types/Button.d.ts +++ b/packages/taro-components/types/Button.d.ts @@ -165,10 +165,6 @@ interface ButtonProps extends StandardProps { * @supported qq */ shareMessageImg?: string - /** 跳转抖音号个人页,只支持小程序绑定的品牌号、员工号、合作号 - * @supported tt - */ - dataAwemeId?: string /** 用户点击该按钮时,会返回获取到的用户信息,回调的detail数据与 Taro.getUserInfo 返回的一致 * * 生效时机: `open-type="getUserInfo"` @@ -193,11 +189,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 +213,6 @@ interface ButtonProps extends StandardProps { * @supported weapp */ onChooseAvatar?: CommonEventFunction - /** - * 用户同意隐私协议事件回调,`open-type="agreePrivacyAuthorization"`时有效 - * @supported weapp - */ - onAgreePrivacyAuthorization?: CommonEventFunction /** 点击。 * 说明: 每点击一次会触发一次事件,建议自行使用代码防止重复点击,可以使用 js 防抖和节流实现。 * @supported alipay @@ -265,12 +251,6 @@ interface ButtonProps extends StandardProps { * @supported qq */ onAddGroupApp?: CommonEventFunction - /** 监听跳转抖音号个人页的回调 - * - * 生效时机:`open-type="openAwemeUserProfile"` - * @supported tt - */ - onOpenAwemeUserProfile?: CommonEventFunction } declare namespace ButtonProps { /** size 的合法值 */ @@ -297,7 +277,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: { diff --git a/packages/taro-components/types/NativeSlot.d.ts b/packages/taro-components/types/NativeSlot.d.ts index 6f21df1d2221..001e96e283a5 100644 --- a/packages/taro-components/types/NativeSlot.d.ts +++ b/packages/taro-components/types/NativeSlot.d.ts @@ -10,7 +10,7 @@ interface NativeSlotProps { /** 编译的原生组件支持使用 slot 插槽 * @classification viewContainer - * @supported weapp, swan, alipay, tt, jd, qq + * @supported weapp, swan, alipay, tt, jd, qq, h5 * @version 3.5.7+ * @example * ```tsx diff --git a/packages/taro-components/types/ShareElement.d.ts b/packages/taro-components/types/ShareElement.d.ts index dde04fc6987b..156eb902da0e 100644 --- a/packages/taro-components/types/ShareElement.d.ts +++ b/packages/taro-components/types/ShareElement.d.ts @@ -6,10 +6,6 @@ interface ShareElementProps extends StandardProps { * @deprecated 使用mapkey替换key */ key?: string - /** 映射标记 - * @supported weapp - */ - mapkey?: string /** 映射标记 * @supported alipay */ diff --git a/packages/taro-components/types/Slot.d.ts b/packages/taro-components/types/Slot.d.ts index 3544445e093d..4f333e021834 100644 --- a/packages/taro-components/types/Slot.d.ts +++ b/packages/taro-components/types/Slot.d.ts @@ -15,7 +15,7 @@ interface SlotProps { /** slot 插槽 * @classification viewContainer - * @supported weapp, swan, alipay, tt, jd, qq, harmony + * @supported weapp, swan, alipay, tt, jd, qq, harmony, h5 * @example * ```tsx * import { Slot, View, Text } from '@tarojs/components'