mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-13 09:28:14 +08:00
🎨 清除缓存后重启
This commit is contained in:
@@ -110,7 +110,6 @@
|
|||||||
import { core } from "@tauri-apps/api";
|
import { core } from "@tauri-apps/api";
|
||||||
import { open } from "@tauri-apps/plugin-dialog";
|
import { open } from "@tauri-apps/plugin-dialog";
|
||||||
import { remove } from "@tauri-apps/plugin-fs";
|
import { remove } from "@tauri-apps/plugin-fs";
|
||||||
import { exit } from "@tauri-apps/plugin-process";
|
|
||||||
import { onMounted, ref } from "vue";
|
import { onMounted, ref } from "vue";
|
||||||
|
|
||||||
import TcAppBadge from "../../components/config/tc-appBadge.vue";
|
import TcAppBadge from "../../components/config/tc-appBadge.vue";
|
||||||
@@ -370,11 +369,10 @@ async function confirmDelCache(): Promise<void> {
|
|||||||
}
|
}
|
||||||
await TGLogger.Info("[Config][confirmDelCache] 缓存清除完成");
|
await TGLogger.Info("[Config][confirmDelCache] 缓存清除完成");
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
showSnackbar({
|
showSnackbar({ text: "缓存已清除!即将重启应用!" });
|
||||||
text: "缓存已清除!即将退出应用!",
|
|
||||||
});
|
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
await exit();
|
const { relaunch } = window.__TAURI_PLUGIN_PROCESS__;
|
||||||
|
await relaunch();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user