|
5 | 5 | <meta name="viewport" content="width=device-width,initial-scale=1"> |
6 | 6 | <meta name="generator" content="VuePress 2.0.0-beta.25"> |
7 | 7 | <link rel=" icon" type=" image/png" sizes=" 32x32" href=" /[email protected]" ><link rel=" icon" type=" image/png" sizes=" 16x16" href=" /[email protected]" ><link rel=" shortcut icon" type=" image/png" sizes=" 16x16" href=" /[email protected]" ><link rel=" manifest" href=" /manifest.webmanifest" ><link rel=" alternate" hreflang=" en" href=" https://www.attojs.org/" ><link rel=" alternate" hreflang=" zh-cn" href=" https://cn.attojs.org/" ><meta name=" application-name" content=" VueRequest" ><meta http-equiv=" Content-Type" content=" text/html; charset=UTF-8" ><meta name=" apple-mobile-web-app-title" content=" VueRequest" ><meta name=" apple-mobile-web-app-status-bar-style" content=" black" ><meta name=" baidu-site-verification" content=" code-kq0ZWRB0uD" ><meta name=" google-site-verification" content=" -zekuAhD-WeZ_iSgC4Js4rVeJ3CxzjRxIpiJN6TL7go" ><meta name=" keywords" content=" vue-request, vue3, vue request, axios, vue, vuejs, js, request, fetch, vue-next, swr, 请求, vue请求库" ><meta name=" attojs-site-env" content=" OTHER" ><meta name=" og:site_name" content=" vue-request" ><meta name=" og:url" content=" https://www.attojs.org/" ><meta name=" og:image" content=" https://www.attojs.org/[email protected]" ><meta name=" og:type" content=" website" ><script src=" https://hm.baidu.com/hm.js?9ff6837028ca9b7ed17fc684b9f946a2" ></script><meta name=" description" content=" vue-request 是一个能轻松帮你管理请求状态(支持SWR,轮询,错误重试,缓存请求,loading状态、分页、无限加载等)的 Vue 3 请求库" ><meta name=" og:description" content=" vue-request 是一个能轻松帮你管理请求状态(支持SWR,轮询,错误重试,缓存请求,loading状态、分页、无限加载等)的 Vue 3 请求库" ><title>公共 API | VueRequest </title> |
8 | | - <link rel="preload" href="/assets/js/runtime~app.cf85e0e3.js" as="script"><link rel="preload" href="/assets/css/styles.63359938.css" as="style"><link rel="preload" href="/assets/js/967.d9b096c3.js" as="script"><link rel="preload" href="/assets/js/app.ba7a4258.js" as="script"> |
| 8 | + <link rel="preload" href="/assets/js/runtime~app.4b29bc1c.js" as="script"><link rel="preload" href="/assets/css/styles.63359938.css" as="style"><link rel="preload" href="/assets/js/967.d9b096c3.js" as="script"><link rel="preload" href="/assets/js/app.9e9088e9.js" as="script"> |
9 | 9 | <link rel="stylesheet" href="/assets/css/styles.63359938.css"> |
10 | 10 | </head> |
11 | 11 | <body> |
|
63 | 63 | <span class="token keyword">return</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span><span class="token punctuation">></span></span><span class="token punctuation">{</span>data<span class="token punctuation">.</span>value<span class="token punctuation">}</span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span><span class="token punctuation">;</span> |
64 | 64 | <span class="token punctuation">}</span><span class="token punctuation">,</span> |
65 | 65 | <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span> |
66 | | -</code></pre></div></li></ul><h3 id=" onsuccess" tabindex=" -1" ><a class=" header-anchor" href=" #onsuccess" aria-hidden=" true" ># </a> onSuccess </h3><ul><li><p><strong>类型: </strong> <code>(data: R, params: P[]) => void </code></p></li><li><p><strong>详情: </strong></p><p>当 <a href=" #service" >Service </a> <code>resolve </code> 时触发,参数为 <a href=" #data" ><code>data </code></a> 和 <a href=" #params" ><code>params </code></a></p><ul><li>如果有 <a href=" #formatresult" ><code>formatResult </code></a> ,则 <a href=" #data" ><code>data </code></a> 为格式化后数据。 </li></ul></li></ul><h3 id=" onerror" tabindex=" -1" ><a class=" header-anchor" href=" #onerror" aria-hidden=" true" ># </a> onError </h3><ul><li><p><strong>类型: </strong> <code>(error: Error, params: P[]) => void </code></p></li><li><p><strong>详情: </strong></p><p>当 <a href=" #service" >Service </a> <code>reject </code> 时触发,参数为 <a href=" #error" ><code>error </code></a> 和 <a href=" #params" ><code>params </code></a></p></li></ul><h3 id=" onbefore" tabindex=" -1" ><a class=" header-anchor" href=" #onbefore" aria-hidden=" true" ># </a> onBefore </h3><ul><li><p><strong>Type: </strong> <code>(params: P[]) => void </code></p></li><li><p><strong>Details: </strong></p><p><a href=" #service" >Service </a> 请求前触发, 参数为 <a href=" #params" ><code>params </code></a>. </p></li></ul><h3 id=" onafter" tabindex=" -1" ><a class=" header-anchor" href=" #onafter" aria-hidden=" true" ># </a> onAfter </h3><ul><li><p><strong>Type: </strong> <code>(params: P[]) => void </code></p></li><li><p><strong>Details: </strong></p><p><a href=" #service" >Service </a> 请求结束后触发, 参数为 <a href=" #params" ><code>params </code></a>. </p></li></ul><!--]--></div><footer class=" page-meta" ><!----><div class=" meta-item last-updated" ><span class=" meta-item-label" >上次更新: </span><span class=" meta-item-info" >3/9/2023, 4:12:59 PM </span></div><div class=" meta-item contributors" ><span class=" meta-item-label" >贡献者: </span><span class=" meta-item-info" ><!--[--><!--[--><span class=" contributor" title=" email: [email protected]" >John </span><!----><!--]--><!--]--></span></div></footer><nav class=" page-nav" ><p class=" inner" ><!----><span class=" next" ><a href=" /api/global-options.html" class=" nav-link" aria-label=" 全局选项" ><!--[--><!--]--> 全局选项 <!--[--><!--]--></a> → </span></p></nav><!--[--><!--]--></main><!--]--></div><!----><!----><!--]--></div> |
67 | | - <script src="/assets/js/runtime~app.cf85e0e3.js" defer></script><script src="/assets/js/967.d9b096c3.js" defer></script><script src="/assets/js/app.ba7a4258.js" defer></script> |
| 66 | +</code></pre></div></li></ul><h3 id=" onsuccess" tabindex=" -1" ><a class=" header-anchor" href=" #onsuccess" aria-hidden=" true" ># </a> onSuccess </h3><ul><li><p><strong>类型: </strong> <code>(data: R, params: P[]) => void </code></p></li><li><p><strong>详情: </strong></p><p>当 <a href=" #service" >Service </a> <code>resolve </code> 时触发,参数为 <a href=" #data" ><code>data </code></a> 和 <a href=" #params" ><code>params </code></a></p><ul><li>如果有 <a href=" #formatresult" ><code>formatResult </code></a> ,则 <a href=" #data" ><code>data </code></a> 为格式化后数据。 </li></ul></li></ul><h3 id=" onerror" tabindex=" -1" ><a class=" header-anchor" href=" #onerror" aria-hidden=" true" ># </a> onError </h3><ul><li><p><strong>类型: </strong> <code>(error: Error, params: P[]) => void </code></p></li><li><p><strong>详情: </strong></p><p>当 <a href=" #service" >Service </a> <code>reject </code> 时触发,参数为 <a href=" #error" ><code>error </code></a> 和 <a href=" #params" ><code>params </code></a></p></li></ul><h3 id=" onbefore" tabindex=" -1" ><a class=" header-anchor" href=" #onbefore" aria-hidden=" true" ># </a> onBefore </h3><ul><li><p><strong>Type: </strong> <code>(params: P[]) => void </code></p></li><li><p><strong>Details: </strong></p><p><a href=" #service" >Service </a> 请求前触发, 参数为 <a href=" #params" ><code>params </code></a>. </p></li></ul><h3 id=" onafter" tabindex=" -1" ><a class=" header-anchor" href=" #onafter" aria-hidden=" true" ># </a> onAfter </h3><ul><li><p><strong>Type: </strong> <code>(params: P[]) => void </code></p></li><li><p><strong>Details: </strong></p><p><a href=" #service" >Service </a> 请求结束后触发, 参数为 <a href=" #params" ><code>params </code></a>. </p></li></ul><!--]--></div><footer class=" page-meta" ><!----><div class=" meta-item last-updated" ><span class=" meta-item-label" >上次更新: </span><span class=" meta-item-info" >6/2/2023, 9:07:34 AM </span></div><div class=" meta-item contributors" ><span class=" meta-item-label" >贡献者: </span><span class=" meta-item-info" ><!--[--><!--[--><span class=" contributor" title=" email: [email protected]" >John </span><!----><!--]--><!--]--></span></div></footer><nav class=" page-nav" ><p class=" inner" ><!----><span class=" next" ><a href=" /api/global-options.html" class=" nav-link" aria-label=" 全局选项" ><!--[--><!--]--> 全局选项 <!--[--><!--]--></a> → </span></p></nav><!--[--><!--]--></main><!--]--></div><!----><!----><!--]--></div> |
| 67 | + <script src="/assets/js/runtime~app.4b29bc1c.js" defer></script><script src="/assets/js/967.d9b096c3.js" defer></script><script src="/assets/js/app.9e9088e9.js" defer></script> |
68 | 68 | </body> |
69 | 69 | </html> |
0 commit comments