mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-08 22:51:25 +08:00
完善相关参数类型
This commit is contained in:
parent
81292e21c8
commit
c15a027005
10
src/plugins/monaco/types/quickcommand.api.d.ts
vendored
10
src/plugins/monaco/types/quickcommand.api.d.ts
vendored
@ -13,7 +13,7 @@ interface quickcommandApi {
|
|||||||
* @param title 窗口标题,默认为空
|
* @param title 窗口标题,默认为空
|
||||||
*/
|
*/
|
||||||
showButtonBox(
|
showButtonBox(
|
||||||
buttons: array,
|
buttons: string[],
|
||||||
title?: string
|
title?: string
|
||||||
): Promise<{ id: number; text: string }>;
|
): Promise<{ id: number; text: string }>;
|
||||||
|
|
||||||
@ -36,9 +36,9 @@ interface quickcommandApi {
|
|||||||
* @param title 窗口标题,默认为空
|
* @param title 窗口标题,默认为空
|
||||||
*/
|
*/
|
||||||
showInputBox(
|
showInputBox(
|
||||||
options: array | { labels: array; values: array; hints: array },
|
options: string[] | { labels: string[]; values: string[]; hints: string[] },
|
||||||
title?: string
|
title?: string
|
||||||
): Promise<array>;
|
): Promise<string[]>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 显示一个支持搜索的且可以动态更新的选项列表,选项类型为文本或html时,返回选择的索引和文本,为对象时,返回选择的对象
|
* 显示一个支持搜索的且可以动态更新的选项列表,选项类型为文本或html时,返回选择的索引和文本,为对象时,返回选择的对象
|
||||||
@ -81,7 +81,7 @@ interface quickcommandApi {
|
|||||||
* 点击后关闭,默认 true
|
* 点击后关闭,默认 true
|
||||||
*/
|
*/
|
||||||
showSelectList(
|
showSelectList(
|
||||||
selects: array,
|
selects: string[] | object[],
|
||||||
options?: {
|
options?: {
|
||||||
placeholder: string;
|
placeholder: string;
|
||||||
optionType: "plaintext" | "html" | "json";
|
optionType: "plaintext" | "html" | "json";
|
||||||
@ -207,7 +207,7 @@ interface quickcommandApi {
|
|||||||
* 不赋值时,则会弹出对话框要求选择下载到的路径;
|
* 不赋值时,则会弹出对话框要求选择下载到的路径;
|
||||||
* 赋值为 Object时,表示弹出对话框的 options,格式和 utools.showSaveDialog 中的 options一致
|
* 赋值为 Object时,表示弹出对话框的 options,格式和 utools.showSaveDialog 中的 options一致
|
||||||
*/
|
*/
|
||||||
downloadFile(url, file?: string | object): Promise<Buffer>;
|
downloadFile(url: string, file?: string | object): Promise<Buffer>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上传文件,可以直接上传指定文件,或者弹出对话框选择要上传的文件,可以自定义表单数据
|
* 上传文件,可以直接上传指定文件,或者弹出对话框选择要上传的文件,可以自定义表单数据
|
||||||
|
Loading…
x
Reference in New Issue
Block a user