mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2026-03-26 05:39:45 +08:00
🚸 重构日期切换逻辑
This commit is contained in:
@@ -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 }}
|
||||
</v-btn>
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user