diff --git a/src/App.vue b/src/App.vue index f6bb8d51..7ca33149 100644 --- a/src/App.vue +++ b/src/App.vue @@ -313,7 +313,7 @@ async function checkUserLoad(): Promise { await new Promise((resolve) => setTimeout(resolve, 1000)); } -async function parseDeepLink(payload: string | string[]): Promise { +async function parseDeepLink(payload: string | Array): Promise { try { if (typeof payload === "string") return payload; if (payload.length < 2) return "teyvatguide://"; diff --git a/src/components/app/t-gameNav.vue b/src/components/app/t-gameNav.vue index b8222be0..a9b31f7c 100644 --- a/src/components/app/t-gameNav.vue +++ b/src/components/app/t-gameNav.vue @@ -36,8 +36,8 @@ const model = defineModel({ default: 2 }); const actId = ref(); const showOverlay = ref(false); -const nav = shallowRef([]); -const codeData = shallowRef([]); +const nav = shallowRef>([]); +const codeData = shallowRef>([]); const hasNav = computed(() => { const liveNames = ["前瞻直播", "前瞻节目", "直播兑换码", "特别节目"]; const find = nav.value.find((item) => liveNames.includes(item.name)); diff --git a/src/components/app/to-nameCard.vue b/src/components/app/to-nameCard.vue index b889b823..88964be9 100644 --- a/src/components/app/to-nameCard.vue +++ b/src/components/app/to-nameCard.vue @@ -81,7 +81,7 @@ function parseNameCard(desc: string): string { return res; } -function parseDesc(desc: string, inQuote: boolean = false): string[] { +function parseDesc(desc: string, inQuote: boolean = false): Array { let res = desc.replace(/。/g, "。\n"); res = res.replace(/;/g, ";\n"); /* 闲云·鹤云 */ @@ -113,7 +113,7 @@ function parseDesc(desc: string, inQuote: boolean = false): string[] { res = res.replace(/\n」/g, "」\n"); } const match = res.split("\n"); - let array: string[] = []; + let array: Array = []; for (const item of match) { if (item.length > 0 && item.length <= 32) { array.push(item); diff --git a/src/components/func/dialog.ts b/src/components/func/dialog.ts index 9ed8b15a..a345e6e4 100644 --- a/src/components/func/dialog.ts +++ b/src/components/func/dialog.ts @@ -1,6 +1,5 @@ /** - * @file component/func/dialog.ts - * @description dialog 组件封装,函数式调用 + * dialog 组件封装,函数式调用 * @since Beta v0.6.3 */ @@ -27,18 +26,15 @@ export type DialogInputParams = { }; /** - * @description 自定义 confirm 组件 + * 自定义 confirm 组件 * @since Beta v0.6.3 - * @extends ComponentInternalInstance - * @property {Function} exposeProxy.displayBox 显示 confirm - * @return DialogInstance */ -interface DialogInstance extends ComponentInternalInstance { +type DialogInstance = { exposeProxy: { displayCheckBox: (props: DialogCheckParams) => Promise; displayInputBox: (props: DialogInputParams) => Promise; }; -} +} & ComponentInternalInstance; function renderBox(props: DialogParams): VNode { const container = document.createElement("div"); diff --git a/src/components/func/geetest.ts b/src/components/func/geetest.ts index b415e63e..01bff19a 100644 --- a/src/components/func/geetest.ts +++ b/src/components/func/geetest.ts @@ -13,18 +13,15 @@ const geetestId = "tg-func-geetest"; /** * 自定义 geetest 组件 * @since Beta v0.8.7 - * @extends ComponentInternalInstance - * @property {Function} exposeProxy.displayBox 弹出 geetest 验证 - * @return GeetestInstance */ -interface GeetestInstance extends ComponentInternalInstance { +type GeetestInstance = { exposeProxy: { displayBox: ( props: TGApp.BBS.Geetest.CreateRes, raw?: TGApp.BBS.CaptchaLogin.CaptchaAigis, ) => Promise; }; -} +} & ComponentInternalInstance; function renderBox(props: TGApp.BBS.Geetest.CreateRes): VNode { const container = document.createElement("div"); @@ -40,9 +37,9 @@ let geetestInstance: VNode; /** * 弹出 geetest 验证 * @since Beta v0.8.7 - * @param {TGApp.BBS.Geetest.CreateRes} props geetest 验证的参数 - * @param {TGApp.BBS.CaptchaLogin.CaptchaAigis} raw 原始数据,一般用于 Gt4 验证 - * @return {Promise} 验证成功返回验证数据 + * @param props - geetest 验证的参数 + * @param raw - 原始数据,一般用于 Gt4 验证 + * @returns 验证数据 */ async function showGeetest( props: TGApp.BBS.Geetest.CreateRes, diff --git a/src/components/func/loading.ts b/src/components/func/loading.ts index 3805bcec..51a6c96a 100644 --- a/src/components/func/loading.ts +++ b/src/components/func/loading.ts @@ -1,6 +1,5 @@ /** - * @file component/func/loading.ts - * @description loading 组件封装,函数式调用 + * loading 组件封装,函数式调用 * @since Beta v0.6.7 */ @@ -17,9 +16,9 @@ type LoadingUpdateParams = Omit & { timeout? const TIMEOUT: Readonly = 150; /** - * @description 自定义 loading 组件 + * 自定义 loading 组件 * @since Beta v0.6.7 - * @return LoadingInstance + * @returns LoadingInstance */ type LoadingInstance = ComponentInternalInstance & { exposeProxy: { displayBox: (props: LoadingParams) => Promise }; diff --git a/src/components/func/snackbar.ts b/src/components/func/snackbar.ts index 3eaafd24..18c489bd 100644 --- a/src/components/func/snackbar.ts +++ b/src/components/func/snackbar.ts @@ -1,6 +1,5 @@ /** - * @file component/func/snackbar.ts - * @description snackbar 组件封装,函数式调用 + * snackbar 组件封装,函数式调用 * @since Beta v0.6.3 */ @@ -14,15 +13,14 @@ const snackbarId = "tg-func-snackbar"; export type SnackbarParams = { text: string; color: string; timeout: number }; /** - * @description 自定义 snackbar 组件 + * 自定义 snackbar 组件 * @since Beta v0.6.3 - * @return SnackbarInstance */ -interface SnackbarInstance extends ComponentInternalInstance { +type SnackbarInstance = { exposeProxy: { displayBox: (props: SnackbarParams) => void; }; -} +} & ComponentInternalInstance; function renderBox(props: SnackbarParams): VNode { const container = document.createElement("div"); diff --git a/src/components/pageAnno/ta-card.vue b/src/components/pageAnno/ta-card.vue index c7eefba4..eb0255e2 100644 --- a/src/components/pageAnno/ta-card.vue +++ b/src/components/pageAnno/ta-card.vue @@ -1,7 +1,7 @@ diff --git a/src/components/userRecord/tur-world-sub.vue b/src/components/userRecord/tur-world-sub.vue index 229f70e4..720bd39c 100644 --- a/src/components/userRecord/tur-world-sub.vue +++ b/src/components/userRecord/tur-world-sub.vue @@ -1,24 +1,25 @@ +