新增quickcommand.showSystemWaitButton接口,编排用户交互分类同步添加相应功能

This commit is contained in:
fofolee
2025-01-20 12:03:50 +08:00
parent bd678e75bf
commit 7dc7e0bbd1
6 changed files with 234 additions and 7 deletions

View File

@@ -628,6 +628,27 @@ interface quickcommandApi {
}
): Promise<{ id: number; text: string | object }>;
/**
* 显示一个系统级等待按钮
* @param options 配置选项
* @param options.text 按钮文本
* @param options.position 按钮位置可选值top-left, top-right, bottom-left, bottom-right
* @param options.showCancel 是否显示取消按钮,默认 true
*
* ```js
* const result = await quickcommand.showSystemWaitButton({
* text: "等待操作",
* position: "bottom-right",
* })
* console.log(result) // true 或 false
* ```
*/
showSystemWaitButton(options?: {
text?: string;
position?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
showCancel?: boolean;
}): Promise<boolean>;
/**
* 运行代码
* @param code 代码