Skip to content

Commit

Permalink
fix(tt): support joinGroup button (#14540)
Browse files Browse the repository at this point in the history
* fix(tt): support joinGroup button

#14529

* chore: format type desc

---------

Co-authored-by: Zakary <zakarycode@gmail.com>
  • Loading branch information
TheKonka and ZakaryCode committed Sep 22, 2023
1 parent e462f76 commit da5db02
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 5 deletions.
16 changes: 14 additions & 2 deletions packages/taro-components/types/Button.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,10 @@ interface ButtonProps extends StandardProps {
* @supported swan
*/
subscribeId?: string
/** 打开群资料卡时,传递的群号
* @supported qq
/**
* @qq 打开群资料卡时,传递的群号
* @tt 群聊 id,通过创建聊天群、查询群信息获取
* @supported qq, tt
*/
groupId?: string
/** 打开频道页面时,传递的频道号
Expand Down Expand Up @@ -169,6 +171,11 @@ interface ButtonProps extends StandardProps {
* @supported tt
*/
dataAwemeId?: string
/**
* 是否开启半屏模式
* @supported tt
*/
dataIsHalfPage?: boolean
/** 用户点击该按钮时,会返回获取到的用户信息,回调的detail数据与 Taro.getUserInfo 返回的一致
*
* 生效时机: `open-type="getUserInfo"`
Expand Down Expand Up @@ -271,6 +278,11 @@ interface ButtonProps extends StandardProps {
* @supported tt
*/
onOpenAwemeUserProfile?: CommonEventFunction
/**
* 加群后触发
* @supported tt
*/
onJoinGroup?: CommonEventFunction<{ errMsg: string; errNo: number }>
}
declare namespace ButtonProps {
/** size 的合法值 */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ require("./taro");
bindGetPhoneNumber: _empty,
"data-channel": _empty,
"data-aweme-id": _empty,
bindOpenAwemeUserProfile: _empty
"group-id": _empty,
"data-is-half-page": _empty,
bindOpenAwemeUserProfile: _empty,
bindJoinGroup: _empty
},
Form: {
"report-submit-timeout": "0"
Expand Down
5 changes: 4 additions & 1 deletion packages/taro-tt/src/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ export const components = {
bindGetPhoneNumber: _empty,
'data-channel': _empty,
'data-aweme-id': _empty,
bindOpenAwemeUserProfile: _empty
'group-id': _empty,
'data-is-half-page': _empty,
bindOpenAwemeUserProfile: _empty,
bindJoinGroup: _empty,
},
Form: {
'report-submit-timeout': '0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1776,7 +1776,10 @@ require("./runtime");
bindGetPhoneNumber: _empty,
"data-channel": _empty,
"data-aweme-id": _empty,
bindOpenAwemeUserProfile: _empty
"group-id": _empty,
"data-is-half-page": _empty,
bindOpenAwemeUserProfile: _empty,
bindJoinGroup: _empty
},
Form: {
"report-submit-timeout": "0"
Expand Down

0 comments on commit da5db02

Please sign in to comment.