跳转到内容

pivotick v3.0.0


拓展 / GraphUI / TopBarActionContext

接口: TopBarActionContext ​

定义于:interfaces/GraphUI.ts:95

TopBarAction的onclick和menu都交给了。

属性 ​

confirm() ​

confirm: (options?) => Promise<boolean>

定义于:interfaces/GraphUI.ts:104

做事前先询问;仅在确认按钮上解析 true。

参数 ​

options? ​

ConfirmOptions

返回值 ​

Promise<boolean>


graph ​

graph: Pivotick

定义于:interfaces/GraphUI.ts:96


promptData() ​

promptData: <T>(options) => Promise<T | null>

定义于:interfaces/GraphUI.ts:102

打开库的模态并解析为值,或取消时为 null。编辑器和拓展表的保存使用相同的声明;以操作标签为标题,并使用 OK 提交,除非选项另有说明。

类型参数 ​

T ​

T = Record<string, unknown>

参数 ​

options ​

PromptDataOptions<T>

返回值 ​

Promise<T | null>


refresh() ​

refresh: () => void

定义于:interfaces/GraphUI.ts:106

重新读取每个操作的字段,如 UIManager.refreshTopBar 所做的那样。

返回值 ​

void