Closed GuoJikun closed 15 hours ago
you can do something like this
tauri::Builder::default()
.build(tauri::generate_context!())
.expect("error while running tauri application")
.run(|app, event| {
if let tauri::RunEvent::ExitRequested { api, code, .. } = event {
if code.is_none() {
api.prevent_exit();
}
}
});
you can do something like this
tauri::Builder::default() .build(tauri::generate_context!()) .expect("error while running tauri application") .run(|app, event| { if let tauri::RunEvent::ExitRequested { api, code, .. } = event { if code.is_none() { api.prevent_exit(); } } });
thanks
Describe the problem
The program is closed after closing all Windows
Describe the solution you'd like
It is recommended to add the configuration item whether to close the program after closing all Windows
Alternatives considered
No response
Additional context
No response