mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-13 09:28:14 +08:00
♻️ refactor(types): 给笨蛋牡蛎一点小小的类型震撼
Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
@@ -102,7 +102,6 @@ import { ref, onMounted } from "vue";
|
||||
// data
|
||||
import { TGAppData } from "../data/index";
|
||||
// interface
|
||||
import type TGTypes from "../core/types/TGTypes";
|
||||
import { OBC_CONTENT_API } from "../plugins/Mys/interface/utils";
|
||||
import { createTGWindow } from "../utils/TGWindow";
|
||||
|
||||
@@ -110,13 +109,13 @@ import { createTGWindow } from "../utils/TGWindow";
|
||||
const loading = ref(true as boolean);
|
||||
|
||||
// data
|
||||
const calendarData = ref(TGAppData.calendar as Record<number, TGTypes.CalendarData>);
|
||||
const calendarData = ref(TGAppData.calendar as Record<number, BTMuli.Genshin.Calendar.CalendarData>);
|
||||
const weekNow = ref(0 as number);
|
||||
const btnNow = ref(0 as number);
|
||||
const dateNow = ref(new Date().toLocaleDateString());
|
||||
const calendarNow = ref({} as TGTypes.CalendarData);
|
||||
const characterCards = ref({} as Record<number, TGTypes.CalendarItem>);
|
||||
const weaponCards = ref({} as Record<number, TGTypes.CalendarItem>);
|
||||
const calendarNow = ref({} as BTMuli.Genshin.Calendar.CalendarData);
|
||||
const characterCards = ref({} as Record<number, BTMuli.Genshin.Calendar.CalendarItem>);
|
||||
const weaponCards = ref({} as Record<number, BTMuli.Genshin.Calendar.CalendarItem>);
|
||||
|
||||
const btnText = [
|
||||
{
|
||||
@@ -172,7 +171,7 @@ function getCalendar (day: number) {
|
||||
return calendarData.value[week];
|
||||
}
|
||||
|
||||
function showContent (material: TGTypes.CalendarMaterial) {
|
||||
function showContent (material: BTMuli.Genshin.Calendar.Material) {
|
||||
const url = OBC_CONTENT_API.replace("{content_id}", material.content_id.toString());
|
||||
createTGWindow(url, "素材详情", material.name, 1200, 800, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user