diff --git a/node_modules/.vue-global-types/vue_3.5_0_0_0.d.ts b/node_modules/.vue-global-types/vue_3.5_0_0_0.d.ts index 72f1004..ae6debf 100644 --- a/node_modules/.vue-global-types/vue_3.5_0_0_0.d.ts +++ b/node_modules/.vue-global-types/vue_3.5_0_0_0.d.ts @@ -2,7 +2,6 @@ export {}; ; declare global { - const __VLS_intrinsicElements: __VLS_IntrinsicElements; const __VLS_directiveBindingRestFields: { instance: null, oldValue: null, modifiers: any, dir: any }; const __VLS_unref: typeof import('vue').unref; const __VLS_placeholder: any; @@ -24,10 +23,31 @@ export {}; N2 extends keyof __VLS_GlobalComponents ? N2 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N2] } : N3 extends keyof __VLS_GlobalComponents ? N3 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N3] } : { [K in N0]: unknown }; - type __VLS_FunctionalComponentProps = - '__ctx' extends keyof __VLS_PickNotAny ? K extends { __ctx?: { props?: infer P } } ? NonNullable

: never - : T extends (props: infer P, ...args: any) => any ? P : - {}; + type __VLS_FunctionalComponentCtx = __VLS_PickNotAny<'__ctx' extends keyof __VLS_PickNotAny + ? K extends { __ctx?: infer Ctx } ? NonNullable : never : any + , T extends (props: any, ctx: infer Ctx) => any ? Ctx : any + >; + type __VLS_FunctionalComponentProps = '__ctx' extends keyof __VLS_PickNotAny + ? K extends { __ctx?: { props?: infer P } } ? NonNullable

: never + : T extends (props: infer P, ...args: any) => any ? P + : {}; + type __VLS_FunctionalComponent = (props: (T extends { $props: infer Props } ? Props : {}) & Record, ctx?: any) => __VLS_Element & { + __ctx?: { + attrs?: any, + slots?: T extends { $slots: infer Slots } ? Slots : Record, + emit?: T extends { $emit: infer Emit } ? Emit : {}, + props?: (T extends { $props: infer Props } ? Props : {}) & Record, + expose?: (exposed: T) => void, + } + }; + type __VLS_NormalizeSlotReturns extends (...args: any) => infer K ? K : any> = R extends any[] ? { + [K in keyof R]: R[K] extends infer V + ? V extends Element ? V + : V extends new (...args: any) => infer R ? ReturnType<__VLS_FunctionalComponent> + : V extends (...args: any) => infer R ? R + : any + : never + } : R; type __VLS_IsFunction = K extends keyof T ? __VLS_IsAny extends false ? unknown extends T[K] @@ -35,13 +55,13 @@ export {}; : true : false : false; - type __VLS_NormalizeComponentEvent = ( + type __VLS_NormalizeComponentEvent = ( __VLS_IsFunction extends true ? Props - : __VLS_IsFunction extends true - ? { [K in onEvent]?: Events[Event] } - : __VLS_IsFunction extends true - ? { [K in onEvent]?: Events[CamelizedEvent] } + : __VLS_IsFunction extends true + ? { [K in onEvent]?: Emits[Event] } + : __VLS_IsFunction extends true + ? { [K in onEvent]?: Emits[CamelizedEvent] } : Props ) & Record; // fix https://github.com/vuejs/language-tools/issues/926 @@ -67,14 +87,16 @@ export {}; } > >; - type __VLS_PrettifyGlobal = { [K in keyof T]: T[K]; } & {}; - type __VLS_PickFunctionalComponentCtx = NonNullable<__VLS_PickNotAny< - '__ctx' extends keyof __VLS_PickNotAny ? K extends { __ctx?: infer Ctx } ? Ctx : never : any - , T extends (props: any, ctx: infer Ctx) => any ? Ctx : any - >>; - type __VLS_OmitStringIndex = { - [K in keyof T as string extends K ? never : K]: T[K]; + type __VLS_ResolveEmits< + Comp, + Emits, + TypeEmits = {}, + NormalizedEmits = __VLS_NormalizeEmits extends infer E ? string extends keyof E ? {} : E : never, + > = __VLS_SpreadMerge; + type __VLS_ResolveDirectives = { + [K in Exclude & string as `v${Capitalize}`]: T[K]; }; + type __VLS_PrettifyGlobal = { [K in keyof T as K]: T[K]; } & {}; type __VLS_UseTemplateRef = Readonly>; function __VLS_getVForSourceType>(source: T): [ @@ -90,10 +112,8 @@ export {}; key: keyof T, index: number, ][]; - // @ts-ignore - function __VLS_getSlotParams(slot: T): Parameters<__VLS_PickNotAny, (...args: any[]) => any>>; - // @ts-ignore - function __VLS_getSlotParam(slot: T): Parameters<__VLS_PickNotAny, (...args: any[]) => any>>[0]; + function __VLS_getSlotParameters(slot: S, decl?: D): + __VLS_PickNotAny, (...args: any) => any> extends (...args: infer P) => any ? P : any[]; function __VLS_asFunctionalDirective(dir: T): T extends import('vue').ObjectDirective ? NonNullable : T extends (...args: any) => any @@ -101,21 +121,12 @@ export {}; : (arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown) => void; function __VLS_makeOptional(t: T): { [K in keyof T]?: T[K] }; function __VLS_asFunctionalComponent any ? InstanceType : unknown>(t: T, instance?: K): - T extends new (...args: any) => any - ? (props: (K extends { $props: infer Props } ? Props : any) & Record, ctx?: any) => __VLS_Element & { - __ctx?: { - attrs?: any; - slots?: K extends { $slots: infer Slots } ? Slots : any; - emit?: K extends { $emit: infer Emit } ? Emit : any; - expose?(exposed: K): void; - props?: (K extends { $props: infer Props } ? Props : any) & Record; - } - } + T extends new (...args: any) => any ? __VLS_FunctionalComponent : T extends () => any ? (props: {}, ctx?: any) => ReturnType : T extends (...args: any) => any ? T - : (_: {} & Record, ctx?: any) => { __ctx?: { attrs?: any, expose?: any, slots?: any, emit?: any, props?: {} & Record } }; + : __VLS_FunctionalComponent<{}>; function __VLS_functionalComponentArgsRest any>(t: T): 2 extends Parameters['length'] ? [any] : []; function __VLS_asFunctionalElement(tag: T, endTag?: T): (attrs: T & Record) => void; - function __VLS_asFunctionalSlot(slot: S): (props: NonNullable extends (props: infer P) => any ? P : {}) => void; + function __VLS_asFunctionalSlot(slot: S): S extends () => infer R ? (props: {}) => R : NonNullable; function __VLS_tryAsConstant(t: T): T; } diff --git a/node_modules/.vue-global-types/vue_99_0_0_0.d.ts b/node_modules/.vue-global-types/vue_99_0_0_0.d.ts index 72f1004..be6912f 100644 --- a/node_modules/.vue-global-types/vue_99_0_0_0.d.ts +++ b/node_modules/.vue-global-types/vue_99_0_0_0.d.ts @@ -2,7 +2,6 @@ export {}; ; declare global { - const __VLS_intrinsicElements: __VLS_IntrinsicElements; const __VLS_directiveBindingRestFields: { instance: null, oldValue: null, modifiers: any, dir: any }; const __VLS_unref: typeof import('vue').unref; const __VLS_placeholder: any; @@ -24,10 +23,31 @@ export {}; N2 extends keyof __VLS_GlobalComponents ? N2 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N2] } : N3 extends keyof __VLS_GlobalComponents ? N3 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N3] } : { [K in N0]: unknown }; - type __VLS_FunctionalComponentProps = - '__ctx' extends keyof __VLS_PickNotAny ? K extends { __ctx?: { props?: infer P } } ? NonNullable

: never - : T extends (props: infer P, ...args: any) => any ? P : - {}; + type __VLS_FunctionalComponentCtx = __VLS_PickNotAny<'__ctx' extends keyof __VLS_PickNotAny + ? K extends { __ctx?: infer Ctx } ? NonNullable : never : any + , T extends (props: any, ctx: infer Ctx) => any ? Ctx : any + >; + type __VLS_FunctionalComponentProps = '__ctx' extends keyof __VLS_PickNotAny + ? K extends { __ctx?: { props?: infer P } } ? NonNullable

: never + : T extends (props: infer P, ...args: any) => any ? P + : {}; + type __VLS_FunctionalComponent = (props: (T extends { $props: infer Props } ? Props : {}) & Record, ctx?: any) => __VLS_Element & { + __ctx?: { + attrs?: any, + slots?: T extends { $slots: infer Slots } ? Slots : Record, + emit?: T extends { $emit: infer Emit } ? Emit : {}, + props?: (T extends { $props: infer Props } ? Props : {}) & Record, + expose?: (exposed: T) => void, + } + }; + type __VLS_NormalizeSlotReturns extends (...args: any) => infer K ? K : any> = R extends any[] ? { + [K in keyof R]: R[K] extends infer V + ? V extends Element ? V + : V extends new (...args: any) => infer R ? ReturnType<__VLS_FunctionalComponent> + : V extends (...args: any) => infer R ? R + : any + : never + } : R; type __VLS_IsFunction = K extends keyof T ? __VLS_IsAny extends false ? unknown extends T[K] @@ -35,13 +55,13 @@ export {}; : true : false : false; - type __VLS_NormalizeComponentEvent = ( + type __VLS_NormalizeComponentEvent = ( __VLS_IsFunction extends true ? Props - : __VLS_IsFunction extends true - ? { [K in onEvent]?: Events[Event] } - : __VLS_IsFunction extends true - ? { [K in onEvent]?: Events[CamelizedEvent] } + : __VLS_IsFunction extends true + ? { [K in onEvent]?: Emits[Event] } + : __VLS_IsFunction extends true + ? { [K in onEvent]?: Emits[CamelizedEvent] } : Props ) & Record; // fix https://github.com/vuejs/language-tools/issues/926 @@ -67,14 +87,16 @@ export {}; } > >; - type __VLS_PrettifyGlobal = { [K in keyof T]: T[K]; } & {}; - type __VLS_PickFunctionalComponentCtx = NonNullable<__VLS_PickNotAny< - '__ctx' extends keyof __VLS_PickNotAny ? K extends { __ctx?: infer Ctx } ? Ctx : never : any - , T extends (props: any, ctx: infer Ctx) => any ? Ctx : any - >>; - type __VLS_OmitStringIndex = { - [K in keyof T as string extends K ? never : K]: T[K]; + type __VLS_ResolveEmits< + Comp, + Emits, + TypeEmits = Comp extends { __typeEmits?: infer T } ? unknown extends T ? {} : import('vue').ShortEmitsToObject : {}, + NormalizedEmits = __VLS_NormalizeEmits extends infer E ? string extends keyof E ? {} : E : never, + > = __VLS_SpreadMerge; + type __VLS_ResolveDirectives = { + [K in Exclude & string as `v${Capitalize}`]: T[K]; }; + type __VLS_PrettifyGlobal = { [K in keyof T as K]: T[K]; } & {}; type __VLS_UseTemplateRef = Readonly>; function __VLS_getVForSourceType>(source: T): [ @@ -90,10 +112,8 @@ export {}; key: keyof T, index: number, ][]; - // @ts-ignore - function __VLS_getSlotParams(slot: T): Parameters<__VLS_PickNotAny, (...args: any[]) => any>>; - // @ts-ignore - function __VLS_getSlotParam(slot: T): Parameters<__VLS_PickNotAny, (...args: any[]) => any>>[0]; + function __VLS_getSlotParameters(slot: S, decl?: D): + __VLS_PickNotAny, (...args: any) => any> extends (...args: infer P) => any ? P : any[]; function __VLS_asFunctionalDirective(dir: T): T extends import('vue').ObjectDirective ? NonNullable : T extends (...args: any) => any @@ -101,21 +121,12 @@ export {}; : (arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown) => void; function __VLS_makeOptional(t: T): { [K in keyof T]?: T[K] }; function __VLS_asFunctionalComponent any ? InstanceType : unknown>(t: T, instance?: K): - T extends new (...args: any) => any - ? (props: (K extends { $props: infer Props } ? Props : any) & Record, ctx?: any) => __VLS_Element & { - __ctx?: { - attrs?: any; - slots?: K extends { $slots: infer Slots } ? Slots : any; - emit?: K extends { $emit: infer Emit } ? Emit : any; - expose?(exposed: K): void; - props?: (K extends { $props: infer Props } ? Props : any) & Record; - } - } + T extends new (...args: any) => any ? __VLS_FunctionalComponent : T extends () => any ? (props: {}, ctx?: any) => ReturnType : T extends (...args: any) => any ? T - : (_: {} & Record, ctx?: any) => { __ctx?: { attrs?: any, expose?: any, slots?: any, emit?: any, props?: {} & Record } }; + : __VLS_FunctionalComponent<{}>; function __VLS_functionalComponentArgsRest any>(t: T): 2 extends Parameters['length'] ? [any] : []; function __VLS_asFunctionalElement(tag: T, endTag?: T): (attrs: T & Record) => void; - function __VLS_asFunctionalSlot(slot: S): (props: NonNullable extends (props: infer P) => any ? P : {}) => void; + function __VLS_asFunctionalSlot(slot: S): S extends () => infer R ? (props: {}) => R : NonNullable; function __VLS_tryAsConstant(t: T): T; } diff --git a/src/components/login_module.vue b/src/components/login_module.vue index c5de07c..75262b6 100644 --- a/src/components/login_module.vue +++ b/src/components/login_module.vue @@ -137,6 +137,8 @@ const handleLogin = async () => { } else { showErrorMessage('登录失败,请稍后重试') } + } else if (error.message === 'Network Error') { + showErrorMessage('无法连接服务器请稍后重试') } else { showErrorMessage(error.message || '登录失败,请稍后重试') } diff --git a/src/components/register_module.vue b/src/components/register_module.vue index 98451cb..10462bf 100644 --- a/src/components/register_module.vue +++ b/src/components/register_module.vue @@ -168,6 +168,8 @@ const handleRegister = async () => { } else { showErrorMessage('注册失败,请稍后重试') } + } else if (error.message === 'Network Error') { + showErrorMessage('无法连接服务器,请检查网络或稍后重试') } else { showErrorMessage(error.message || '注册失败,请稍后重试') }