mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-12 09:18:14 +08:00
🐛 修复UID切换数据未刷新
This commit is contained in:
@@ -41,7 +41,7 @@ onMounted(async () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.cur,
|
() => props.uid,
|
||||||
async () => await refreshOverview(),
|
async () => await refreshOverview(),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ import { path } from "@tauri-apps/api";
|
|||||||
import { UnlistenFn, listen } from "@tauri-apps/api/event";
|
import { UnlistenFn, listen } from "@tauri-apps/api/event";
|
||||||
import { open, save } from "@tauri-apps/plugin-dialog";
|
import { open, save } from "@tauri-apps/plugin-dialog";
|
||||||
import { writeTextFile } from "@tauri-apps/plugin-fs";
|
import { writeTextFile } from "@tauri-apps/plugin-fs";
|
||||||
import { onMounted, ref, computed, onUnmounted } from "vue";
|
import { onMounted, ref, watch, computed, onUnmounted } from "vue";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
|
|
||||||
import showConfirm from "../../components/func/confirm.js";
|
import showConfirm from "../../components/func/confirm.js";
|
||||||
@@ -116,6 +116,11 @@ onMounted(async () => {
|
|||||||
achiListener = await listen<number>("updateAchi", async () => await refreshOverview());
|
achiListener = await listen<number>("updateAchi", async () => await refreshOverview());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => uidCur,
|
||||||
|
async () => await refreshOverview(),
|
||||||
|
);
|
||||||
|
|
||||||
onUnmounted(async () => {
|
onUnmounted(async () => {
|
||||||
if (achiListener !== null) {
|
if (achiListener !== null) {
|
||||||
achiListener();
|
achiListener();
|
||||||
|
|||||||
Reference in New Issue
Block a user