Skip to content

Commit

Permalink
refactor(types): sync components types
Browse files Browse the repository at this point in the history
  • Loading branch information
TheKonka authored Sep 2, 2023
1 parent ab4f87c commit 685ca38
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 25 deletions.
26 changes: 5 additions & 21 deletions packages/taro-components/types/Button.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,6 @@ interface ButtonProps extends StandardProps {
* @supported qq
*/
shareMessageImg?: string
/** 跳转抖音号个人页,只支持小程序绑定的品牌号、员工号、合作号
* @supported tt
*/
dataAwemeId?: string
/** 用户点击该按钮时,会返回获取到的用户信息,回调的detail数据与 Taro.getUserInfo 返回的一致
*
* 生效时机: `open-type="getUserInfo"`
Expand All @@ -193,11 +189,6 @@ interface ButtonProps extends StandardProps {
* @supported weapp, alipay, swan, tt, jd
*/
onGetPhoneNumber?: CommonEventFunction<ButtonProps.onGetPhoneNumberEventDetail>
/**
* 手机号实时验证回调,`open-type="getRealtimePhoneNumber"` 时有效
* @supported weapp
*/
onGetRealTimePhoneNumber?: CommonEventFunction<ButtonProps.onGetRealTimePhoneNumberEventDetail>
/** 当使用开放能力时,发生错误的回调
*
* 生效时机:`open-type="launchApp"`
Expand All @@ -222,11 +213,6 @@ interface ButtonProps extends StandardProps {
* @supported weapp
*/
onChooseAvatar?: CommonEventFunction
/**
* 用户同意隐私协议事件回调,`open-type="agreePrivacyAuthorization"`时有效
* @supported weapp
*/
onAgreePrivacyAuthorization?: CommonEventFunction
/** 点击。
* 说明: 每点击一次会触发一次事件,建议自行使用代码防止重复点击,可以使用 js 防抖和节流实现。
* @supported alipay
Expand Down Expand Up @@ -265,12 +251,6 @@ interface ButtonProps extends StandardProps {
* @supported qq
*/
onAddGroupApp?: CommonEventFunction
/** 监听跳转抖音号个人页的回调
*
* 生效时机:`open-type="openAwemeUserProfile"`
* @supported tt
*/
onOpenAwemeUserProfile?: CommonEventFunction
}
declare namespace ButtonProps {
/** size 的合法值 */
Expand All @@ -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: {
Expand Down
4 changes: 0 additions & 4 deletions packages/taro-components/types/ShareElement.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ interface ShareElementProps extends StandardProps {
* @deprecated 使用mapkey替换key
*/
key?: string
/** 映射标记
* @supported weapp
*/
mapkey?: string
/** 映射标记
* @supported alipay
*/
Expand Down

0 comments on commit 685ca38

Please sign in to comment.