🔨 🧑‍💻 添加vue-devtools 优化开发者体验

Co-authored-by: 舰队的偶像-岛风酱! <frg2089@outlook.com>
Signed-off-by: 舰队的偶像-岛风酱! <frg2089@outlook.com>
This commit is contained in:
BTMuli
2023-04-05 23:08:57 +08:00
committed by 舰队的偶像-岛风酱!
parent d817628de5
commit b31d82d8e9
9 changed files with 1545 additions and 24 deletions

View File

@@ -1,8 +1,18 @@
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
use tauri::Manager;
fn main() {
tauri::Builder::default()
.setup(|app| {
#[cfg(debug_assertions)] // only include this code on debug builds
{
let window = app.get_window("tauri-genshin").unwrap();
window.open_devtools(); // open the devtools on startup
}
Ok(())
})
.run(tauri::generate_context!())
.expect("error while running tauri application");
}