📦 add(db): 添加数据库路径

This commit is contained in:
BTMuli
2023-04-24 17:32:44 +08:00
parent 805b358e6d
commit eeba1f9978
2 changed files with 7 additions and 0 deletions

View File

@@ -16,6 +16,8 @@ import { path } from "@tauri-apps/api";
const userDataDir = `${await path.appLocalDataDir()}userData`;
// 用于各种临时数据的路径
const tempDataDir = `${await path.appLocalDataDir()}tempData`;
// 用于存放数据库的路径
const dbDataPath = `${await path.appConfigDir()}tauri-genshin.db`;
export const useAppStore = defineStore(
"app",
@@ -44,6 +46,7 @@ export const useAppStore = defineStore(
const dataPath = reactive({
userDataDir,
tempDataDir,
dbDataPath,
});
// 用户数据路径
const userPath = ref({