@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 Contributors. CC-BY / MIT