From f4fa12332de0e3094bd944ab3af7ad4a6a40b70c Mon Sep 17 00:00:00 2001 From: ClariS <1457715339@qq.com> Date: Tue, 17 Jan 2023 11:11:56 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E4=BC=98=E5=8C=96=E5=85=A8=E5=B1=8F?= =?UTF-8?q?=20loading=20hook=20=E5=91=BD=E5=90=8D=20(#44)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mock.ts | 12 ++++++------ src/views/hooks/use-fullscreen-loading.vue | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/api/mock.ts b/src/api/mock.ts index e9a0007..d16c594 100644 --- a/src/api/mock.ts +++ b/src/api/mock.ts @@ -31,23 +31,23 @@ export function getRemoteSelectData() { }) } -export interface IBirdsItem { +export interface IComicsItem { id: number name: string } -export const getBirds = () => { - return new Promise((resolve) => { +export const getComics = () => { + return new Promise((resolve) => { setTimeout(() => { - resolve([...Array(5)].map((_t, index) => ({ id: index, name: `t${index}` }))) + resolve([...Array(5)].map((_t, index) => ({ id: index, name: `c${index}` }))) }, 1000) }) } -export const getCars = (id: number) => { +export const getAnimations = (id: number) => { return new Promise((_resolve, reject) => { setTimeout(() => { - reject(new Error("sorry" + id)) + reject(new Error(`Sorry, there is an error here. The error id is ${id}`)) }, 1000) }) } diff --git a/src/views/hooks/use-fullscreen-loading.vue b/src/views/hooks/use-fullscreen-loading.vue index 6654c50..a8958aa 100644 --- a/src/views/hooks/use-fullscreen-loading.vue +++ b/src/views/hooks/use-fullscreen-loading.vue @@ -6,13 +6,13 @@