index.vue 498 B

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