@tauri-apps/plugin-window-state
枚举
StateFlags
枚举成员
全部
ALL: 63;
来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/window-state/guest-js/index.ts#L15
装饰
DECORATIONS: 16;
来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/window-state/guest-js/index.ts#L13
全屏
FULLSCREEN: 32;
来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/window-state/guest-js/index.ts#L14
最大化
MAXIMIZED: 4;
来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/window-state/guest-js/index.ts#L11
位置
POSITION: 2;
来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/window-state/guest-js/index.ts#L10
大小
SIZE: 1;
来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/window-state/guest-js/index.ts#L9
可见
VISIBLE: 8;
来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/window-state/guest-js/index.ts#L12
函数
filename()
function filename(): Promise<string>
获取用于存储窗口状态的文件的名称。
返回值
Promise
<string
>
来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/window-state/guest-js/index.ts#L44
restoreState()
function restoreState(label, flags): Promise<void>
从磁盘恢复指定窗口的状态。
参数
参数 | 类型 |
---|---|
label | string |
flags | StateFlags |
返回值
Promise
<void
>
来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/window-state/guest-js/index.ts#L28
restoreStateCurrent()
function restoreStateCurrent(flags): Promise<void>
从磁盘恢复当前窗口的状态。
参数
参数 | 类型 |
---|---|
flags | StateFlags |
返回值
Promise
<void
>
来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/window-state/guest-js/index.ts#L38
saveWindowState()
function saveWindowState(flags): Promise<void>
保存所有打开窗口的状态到磁盘。
参数
参数 | 类型 |
---|---|
flags | StateFlags |
返回值
Promise
<void
>
来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/window-state/guest-js/index.ts#L21
© 2025 Tauri 贡献者。CC-BY / MIT