Ben Lin
2024-05-30 e33d593df8bf528ad793bf80eb8f391513ccc2ba
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<template>
  <div class="request-box">
    <a-button @click="handleClick" type="primary"> 点击会重新发起请求5次 </a-button>
    <p>打开浏览器的network面板,可以看到发出了六次请求</p>
  </div>
</template>
<script lang="ts" setup>
  import { testRetry } from '/@/api/sys/user';
  // @ts-ignore
  const handleClick = async () => {
    await testRetry();
  };
</script>
 
<style lang="less">
  .request-box {
    margin: 50px;
  }
 
  p {
    margin-top: 10px;
  }
</style>