Skip to content

Commit c34c748

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

File tree

2 files changed

+1
-54
lines changed

2 files changed

+1
-54
lines changed

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

Lines changed: 1 addition & 50 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,7 @@ 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 = keyof openTypeKeys['weapp'] | keyof openTypeKeys['alipay'] | keyof openTypeKeys['qq']
301281
/** open-type 的合法值 */
302282
interface openTypeKeys {
303283
weapp: {
@@ -379,35 +359,6 @@ declare namespace ButtonProps {
379359
/** 在自定义开放数据域组件中,向指定好友发起分享据 */
380360
shareMessageToFriend
381361
}
382-
/** TT 小程序专属的 open-type 合法值
383-
* @see https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/component/list/button/#open-type-%E7%9A%84%E5%90%88%E6%B3%95%E5%80%BC
384-
*/
385-
tt: {
386-
/** 触发用户转发, 可以配合 data-channel 属性来设置分享的 channel,具体请参考 ShareParam */
387-
share
388-
/** 获取用户手机号,可以从 bindgetphonenumber 回调中获取到用户信息,详情请参见获取手机号 */
389-
getPhoneNumber
390-
/** 跳转到抖音IM客服,详情请参见抖音IM客服能力 */
391-
im
392-
/** 跳转到抖音平台客服,详情请参见平台客服能力 */
393-
platformIm
394-
/** 跳转视频播放页,详情请参见跳转视频播放页 */
395-
navigateToVideoView
396-
/** 跳转抖音号个人页,详情请参见跳转抖音号个人页 */
397-
openAwemeUserProfile
398-
/** 跳转抖音直播间,详情请参见跳转抖音直播间 */
399-
openWebcastRoom
400-
/** 写入系统日历,详情请参见写入系统日历 */
401-
addCalendarEvent
402-
/** 添加到桌面,详情请参见添加到桌面 */
403-
addShortcut
404-
/** 加群,详情请参见加群 */
405-
joinGroup
406-
/** 私信,详情请参见私信 */
407-
privateMessage
408-
/** 主动授权私信,详情请参见主动授权私信 */
409-
authorizePrivateMessage
410-
}
411362
}
412363
/** lang 的合法值 */
413364
interface Lang {

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
*/

0 commit comments

Comments
 (0)