diff --git a/src/components/pageHome/ph-comp-calendar.vue b/src/components/pageHome/ph-comp-calendar.vue index ed04bfc6..67f98c6a 100644 --- a/src/components/pageHome/ph-comp-calendar.vue +++ b/src/components/pageHome/ph-comp-calendar.vue @@ -14,7 +14,7 @@ rounded class="tc-btn" :class="{ selected: text.week === btnNow, today: text.week === weekNow }" - @click="btnNow = text.week" + @click="switchDay(text.week)" > {{ text.text }} @@ -87,6 +87,11 @@ onMounted(() => { emits("success"); }); +function switchDay(day: number): void { + btnNow.value = day; + page.value = 1; +} + function switchType(): void { selectedType.value = selectedType.value === "character" ? "weapon" : "character"; page.value = 1;