Skip to content

Commit

Permalink
perf: 优化请求例子
Browse files Browse the repository at this point in the history
  • Loading branch information
kailong321200875 committed Sep 27, 2023
1 parent d392868 commit 6b3d2e1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/views/Function/Request.vue
Expand Up @@ -20,6 +20,8 @@ const getRequest1 = async () => {
console.log('【res】:', res)
} catch (error) {
console.log('【error】:', error)
} finally {
pending.value.delete('/request/1')
}
}
Expand All @@ -33,6 +35,8 @@ const getRequest2 = async () => {
console.log('【res】:', res)
} catch (error) {
console.log('【error】:', error)
} finally {
pending.value.delete('/request/2')
}
}
Expand All @@ -46,6 +50,8 @@ const getRequest3 = async () => {
console.log('【res】:', res)
} catch (error) {
console.log('【error】:', error)
} finally {
pending.value.delete('/request/3')
}
}
Expand All @@ -59,6 +65,8 @@ const getRequest4 = async () => {
console.log('【res】:', res)
} catch (error) {
console.log('【error】:', error)
} finally {
pending.value.delete('/request/4')
}
}
Expand All @@ -72,6 +80,8 @@ const getRequest5 = async () => {
console.log('【res】:', res)
} catch (error) {
console.log('【error】:', error)
} finally {
pending.value.delete('/request/5')
}
}
Expand Down

0 comments on commit 6b3d2e1

Please sign in to comment.