Skip to content

Commit ee3f700

Browse files
Runc2333runc
andauthored
fix(weapp/updateShareMenu): 修正 updateShareMenu 的类型定义 (#18603)
Co-authored-by: runc <runc@arrun.net>
1 parent 2de8374 commit ee3f700

1 file changed

Lines changed: 37 additions & 11 deletions

File tree

packages/taro/types/api/share/index.d.ts

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,52 @@ import Taro from '../../index'
33
declare module '../../index' {
44
namespace updateShareMenu {
55
interface Option {
6-
/** 动态消息的 activityId。通过 [updatableMessage.createActivityId](https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/updatable-message/updatableMessage.createActivityId.html) 接口获取 */
7-
activityId?: string
8-
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
9-
complete?: (res: TaroGeneral.CallbackResult) => void
10-
/** 接口调用失败的回调函数 */
11-
fail?: (res: TaroGeneral.CallbackResult) => void
12-
/** 是否是动态消息,详见[动态消息](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share/updatable-message.html) */
6+
/** 是否使用带 shareTicket 的转发[详情](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share.html)
7+
* @default false
8+
*/
9+
withShareTicket?: boolean
10+
/** 是否是动态消息,详见[动态消息](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share/updatable-message.html)
11+
* @default false
12+
*/
1313
isUpdatableMessage?: boolean
14+
/** 动态消息的 activityId。通过 [updatableMessage.createActivityId](https://developers.weixin.qq.com/miniprogram/dev/api/share/errorupdatableMessage.createActivityId)) 接口获取
15+
*/
16+
activityId?: string
17+
/** 群待办消息的id,通过toDoActivityId可以把多个群待办消息聚合为同一个。通过 [updatableMessage.createActivityId](https://developers.weixin.qq.com/miniprogram/dev/api/share/errorupdatableMessage.createActivityId) 接口获取。详见[群待办消息](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share.html
18+
*/
19+
toDoActivityId?: string
20+
/** 动态消息的模板信息
21+
*/
22+
templateInfo?: UpdatableMessageFrontEndTemplateInfo
23+
/** 是否是私密消息。详见 [小程序私密消息](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share/private-message.html)
24+
*/
25+
isPrivateMessage?: boolean
26+
/** 参与用户此聊天室下的 group_openid 列表
27+
* @default []
28+
*/
29+
participant?: string[]
30+
/** 聊天工具模式特殊动态消息
31+
* @default false
32+
*/
33+
useForChatTool?: boolean
34+
/** 指定成员的方式
35+
* @default 1
36+
*/
37+
chooseType?: number
1438
/** 接口调用成功的回调函数 */
1539
success?: (res: TaroGeneral.CallbackResult) => void
16-
/** 动态消息的模板信息 */
17-
templateInfo?: UpdatableMessageFrontEndTemplateInfo
18-
/** 是否使用带 shareTicket 的转发[详情](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share.html) */
19-
withShareTicket?: boolean
40+
/** 接口调用失败的回调函数 */
41+
fail?: (res: TaroGeneral.CallbackResult) => void
42+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
43+
complete?: (res: TaroGeneral.CallbackResult) => void
2044
}
2145

2246
/** 动态消息的模板信息 */
2347
interface UpdatableMessageFrontEndTemplateInfo {
2448
/** 参数列表 */
2549
parameterList: UpdatableMessageFrontEndParameter[]
50+
/** 模板ID */
51+
templateId: string
2652
}
2753
/** 参数列表 */
2854
interface UpdatableMessageFrontEndParameter {

0 commit comments

Comments
 (0)