Tauri 配置应用系统托盘
2024-01-29 16:19 更新
创建的实例可以在结构上使用 API 进行设置:
SystemTray
system_tray
tauri::Builder
use tauri::{CustomMenuItem, SystemTray, SystemTrayMenu};
fn main() {
let tray_menu = SystemTrayMenu::new(); // insert the menu items here
let system_tray = SystemTray::new()
.with_menu(tray_menu);
tauri::Builder::default()
.system_tray(system_tray)
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
以上内容是否对您有帮助:
更多建议: