Skip to content

Commit

Permalink
🐛 修复UID切换数据未刷新
Browse files Browse the repository at this point in the history
  • Loading branch information
BTMuli committed Sep 20, 2024
1 parent 4e3ad58 commit c452be8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/userAchi/tua-series.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ onMounted(async () => {
});
watch(
() => props.cur,
() => props.uid,
async () => await refreshOverview(),
);
Expand Down
7 changes: 6 additions & 1 deletion src/pages/common/Achievements.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import { path } from "@tauri-apps/api";
import { UnlistenFn, listen } from "@tauri-apps/api/event";
import { open, save } from "@tauri-apps/plugin-dialog";
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 showConfirm from "../../components/func/confirm.js";
Expand Down Expand Up @@ -116,6 +116,11 @@ onMounted(async () => {
achiListener = await listen<number>("updateAchi", async () => await refreshOverview());
});
watch(
() => uidCur,
async () => await refreshOverview(),
);
onUnmounted(async () => {
if (achiListener !== null) {
achiListener();
Expand Down

0 comments on commit c452be8

Please sign in to comment.