diff --git a/src/App.vue b/src/App.vue
index 319681ba..06e7388b 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,26 +1,14 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -30,7 +18,7 @@ import { onMounted, ref } from "vue";
import TSidebar from "./components/t-sidebar.vue";
import TBackTop from "./components/t-backTop.vue";
// tauri
-import { fs, window, app, event } from "@tauri-apps/api";
+import { app, event, fs, window } from "@tauri-apps/api";
// store
import { useAppStore } from "./store/modules/app";
@@ -72,19 +60,24 @@ async function checkLoad () {
appStore.loading = true;
console.info("数据加载完成!");
}
+
// 创建数据文件夹
async function createDataDir () {
console.info("开始创建数据文件夹...");
// 如果不存在则创建
- if (!await fs.exists("userData", { dir: fs.BaseDirectory.AppLocalData })) { await fs.createDir("userData", { dir: fs.BaseDirectory.AppLocalData, recursive: true }); }
- if (!await fs.exists("tempData", { dir: fs.BaseDirectory.AppLocalData })) { await fs.createDir("tempData", { dir: fs.BaseDirectory.AppLocalData, recursive: true }); }
+ if (!await fs.exists("userData", { dir: fs.BaseDirectory.AppLocalData })) {
+ await fs.createDir("userData", { dir: fs.BaseDirectory.AppLocalData, recursive: true });
+ }
+ if (!await fs.exists("tempData", { dir: fs.BaseDirectory.AppLocalData })) {
+ await fs.createDir("tempData", { dir: fs.BaseDirectory.AppLocalData, recursive: true });
+ }
console.info("数据文件夹创建完成!");
}