Skip to content

Commit 32e7d9a

Browse files
authored
refactor(types): sync components types
1 parent d1171ac commit 32e7d9a

File tree

5 files changed

+8
-28
lines changed

5 files changed

+8
-28
lines changed

packages/taro-components/types/Button.d.ts

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,6 @@ interface ButtonProps extends StandardProps {
165165
* @supported qq
166166
*/
167167
shareMessageImg?: string
168-
/** 跳转抖音号个人页,只支持小程序绑定的品牌号、员工号、合作号
169-
* @supported tt
170-
*/
171-
dataAwemeId?: string
172168
/** 用户点击该按钮时,会返回获取到的用户信息,回调的detail数据与 Taro.getUserInfo 返回的一致
173169
*
174170
* 生效时机: `open-type="getUserInfo"`
@@ -193,11 +189,6 @@ interface ButtonProps extends StandardProps {
193189
* @supported weapp, alipay, swan, tt, jd
194190
*/
195191
onGetPhoneNumber?: CommonEventFunction<ButtonProps.onGetPhoneNumberEventDetail>
196-
/**
197-
* 手机号实时验证回调,`open-type="getRealtimePhoneNumber"` 时有效
198-
* @supported weapp
199-
*/
200-
onGetRealTimePhoneNumber?: CommonEventFunction<ButtonProps.onGetRealTimePhoneNumberEventDetail>
201192
/** 当使用开放能力时,发生错误的回调
202193
*
203194
* 生效时机:`open-type="launchApp"`
@@ -222,11 +213,6 @@ interface ButtonProps extends StandardProps {
222213
* @supported weapp
223214
*/
224215
onChooseAvatar?: CommonEventFunction
225-
/**
226-
* 用户同意隐私协议事件回调,`open-type="agreePrivacyAuthorization"`时有效
227-
* @supported weapp
228-
*/
229-
onAgreePrivacyAuthorization?: CommonEventFunction
230216
/** 点击。
231217
* 说明: 每点击一次会触发一次事件,建议自行使用代码防止重复点击,可以使用 js 防抖和节流实现。
232218
* @supported alipay
@@ -265,12 +251,6 @@ interface ButtonProps extends StandardProps {
265251
* @supported qq
266252
*/
267253
onAddGroupApp?: CommonEventFunction
268-
/** 监听跳转抖音号个人页的回调
269-
*
270-
* 生效时机:`open-type="openAwemeUserProfile"`
271-
* @supported tt
272-
*/
273-
onOpenAwemeUserProfile?: CommonEventFunction
274254
}
275255
declare namespace ButtonProps {
276256
/** size 的合法值 */
@@ -297,7 +277,11 @@ declare namespace ButtonProps {
297277
reset
298278
}
299279
/** open-type 的合法值 */
300-
type OpenType = keyof openTypeKeys['weapp'] | keyof openTypeKeys['alipay'] | keyof openTypeKeys['qq'] | keyof openTypeKeys['tt']
280+
type OpenType =
281+
| keyof openTypeKeys['weapp']
282+
| keyof openTypeKeys['alipay']
283+
| keyof openTypeKeys['qq']
284+
| keyof openTypeKeys['tt']
301285
/** open-type 的合法值 */
302286
interface openTypeKeys {
303287
weapp: {

packages/taro-components/types/NativeSlot.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ interface NativeSlotProps {
1010

1111
/** 编译的原生组件支持使用 slot 插槽
1212
* @classification viewContainer
13-
* @supported weapp, swan, alipay, tt, jd, qq
13+
* @supported weapp, swan, alipay, tt, jd, qq, h5
1414
* @version 3.5.7+
1515
* @example
1616
* ```tsx

packages/taro-components/types/ShareElement.d.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ interface ShareElementProps extends StandardProps {
66
* @deprecated 使用mapkey替换key
77
*/
88
key?: string
9-
/** 映射标记
10-
* @supported weapp
11-
*/
12-
mapkey?: string
139
/** 映射标记
1410
* @supported alipay
1511
*/

packages/taro-components/types/Slot.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ interface SlotProps {
1515

1616
/** slot 插槽
1717
* @classification viewContainer
18-
* @supported weapp, swan, alipay, tt, jd, qq, harmony
18+
* @supported weapp, swan, alipay, tt, jd, qq, harmony, h5
1919
* @example
2020
* ```tsx
2121
* import { Slot, View, Text } from '@tarojs/components'

packages/taro-components/types/Textarea.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ interface TextareaProps extends StandardProps, FormItemProps {
9999
/** 点击键盘右下角按钮时是否保持键盘不收起
100100
* @supported weapp, swan, tt
101101
*/
102-
confirmHold?: string
102+
confirmHold?: boolean
103103
/** 组件名字,用于表单提交获取数据。
104104
* @supported alipay
105105
*/

0 commit comments

Comments
 (0)