Skip to content

Commit e22c566

Browse files
committed
Deployed on 2023-07-06 11:23:33
1 parent 7800afa commit e22c566

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+155
-155
lines changed

404.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
<meta name="viewport" content="width=device-width,initial-scale=1">
66
<meta name="generator" content="VuePress 2.0.0-beta.25">
77
<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-ovMj8h2L3y"><meta name="google-site-verification" content="-zekuAhD-WeZ_iSgC4Js4rVeJ3CxzjRxIpiJN6TL7go"><meta name="keywords" content="vue-request, vue3, vue2, 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?a941ff3233d638d299d78b7f1013b7b0"></script><meta name="description" content="vue-request 是一个能轻松帮你管理请求状态(支持SWR,轮询,错误重试,缓存请求,loading状态、分页、无限加载等)的 Vue 请求库"><meta name="og:description" content="vue-request 是一个能轻松帮你管理请求状态(支持SWR,轮询,错误重试,缓存请求,loading状态、分页、无限加载等)的 Vue 请求库"><title>VueRequest</title>
8-
<link rel="preload" href="/assets/js/runtime~app.1d6bd3fc.js" as="script"><link rel="preload" href="/assets/css/styles.e687a4a1.css" as="style"><link rel="preload" href="/assets/js/621.6814818f.js" as="script"><link rel="preload" href="/assets/js/app.90e67ace.js" as="script">
8+
<link rel="preload" href="/assets/js/runtime~app.8fcb273b.js" as="script"><link rel="preload" href="/assets/css/styles.e687a4a1.css" as="style"><link rel="preload" href="/assets/js/621.6814818f.js" as="script"><link rel="preload" href="/assets/js/app.92b92359.js" as="script">
99
<link rel="stylesheet" href="/assets/css/styles.e687a4a1.css">
1010
</head>
1111
<body>
12-
<div id="app"><!--[--><div class="theme-container"><div class="theme-default-content"><h1>404</h1><blockquote>我们怎么到这来了?</blockquote><p>将在<span style="color: #3eaf7c; font-weight: 600;"> 3 </span>秒后自动跳转至首页</p><a href="/" class="">返回首页</a></div></div><!----><!----><!--]--></div>
13-
<script src="/assets/js/runtime~app.1d6bd3fc.js" defer></script><script src="/assets/js/621.6814818f.js" defer></script><script src="/assets/js/app.90e67ace.js" defer></script>
12+
<div id="app"><!--[--><div class="theme-container"><div class="theme-default-content"><h1>404</h1><blockquote>这是一个 404 页面</blockquote><p>将在<span style="color: #3eaf7c; font-weight: 600;"> 3 </span>秒后自动跳转至首页</p><a href="/" class="">返回首页</a></div></div><!----><!----><!--]--></div>
13+
<script src="/assets/js/runtime~app.8fcb273b.js" defer></script><script src="/assets/js/621.6814818f.js" defer></script><script src="/assets/js/app.92b92359.js" defer></script>
1414
</body>
1515
</html>

api/global-options.html

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

api/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta name="viewport" content="width=device-width,initial-scale=1">
66
<meta name="generator" content="VuePress 2.0.0-beta.25">
77
<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-ovMj8h2L3y"><meta name="google-site-verification" content="-zekuAhD-WeZ_iSgC4Js4rVeJ3CxzjRxIpiJN6TL7go"><meta name="keywords" content="vue-request, vue3, vue2, 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?a941ff3233d638d299d78b7f1013b7b0"></script><meta name="description" content="vue-request 是一个能轻松帮你管理请求状态(支持SWR,轮询,错误重试,缓存请求,loading状态、分页、无限加载等)的 Vue 请求库"><meta name="og:description" content="vue-request 是一个能轻松帮你管理请求状态(支持SWR,轮询,错误重试,缓存请求,loading状态、分页、无限加载等)的 Vue 请求库"><title>公共 API | VueRequest</title>
8-
<link rel="preload" href="/assets/js/runtime~app.1d6bd3fc.js" as="script"><link rel="preload" href="/assets/css/styles.e687a4a1.css" as="style"><link rel="preload" href="/assets/js/621.6814818f.js" as="script"><link rel="preload" href="/assets/js/app.90e67ace.js" as="script">
8+
<link rel="preload" href="/assets/js/runtime~app.8fcb273b.js" as="script"><link rel="preload" href="/assets/css/styles.e687a4a1.css" as="style"><link rel="preload" href="/assets/js/621.6814818f.js" as="script"><link rel="preload" href="/assets/js/app.92b92359.js" as="script">
99
<link rel="stylesheet" href="/assets/css/styles.e687a4a1.css">
1010
</head>
1111
<body>
@@ -63,7 +63,7 @@
6363
time<span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">;</span>
6464
<span class="token punctuation">}</span><span class="token punctuation">;</span>
6565
</code></pre></div></li><li><p><strong>详情:</strong></p><p>自定义读取缓存</p></li><li><p><strong>参考:</strong> <a href="/guide/documentation/cacheKey.html#%E8%87%AA%E5%AE%9A%E4%B9%89%E7%BC%93%E5%AD%98" class="">自定义缓存</a></p></li></ul><h3 id="errorretrycount" tabindex="-1"><a class="header-anchor" href="#errorretrycount" aria-hidden="true">#</a> errorRetryCount <span class="badge tip" style="vertical-align:top;"><!--[-->响应式<!--]--></span></h3><ul><li><p><strong>类型:</strong> <code>number | Ref&lt;number&gt;</code></p></li><li><p><strong>默认值:</strong> <code>0</code></p></li><li><p><strong>详情:</strong></p><p>最大错误重试次数</p></li><li><p><strong>参考:</strong> <a href="/guide/documentation/errorRetry.html#%E9%87%8D%E8%AF%95%E6%AC%A1%E6%95%B0" class="">错误重试次数</a></p></li></ul><h3 id="errorretryinterval" tabindex="-1"><a class="header-anchor" href="#errorretryinterval" aria-hidden="true">#</a> errorRetryInterval <span class="badge tip" style="vertical-align:top;"><!--[-->响应式<!--]--></span></h3><ul><li><p><strong>类型:</strong> <code>number | Ref&lt;number&gt;</code></p></li><li><p><strong>默认值:</strong> <code>0</code></p></li><li><p><strong>详情:</strong></p><p>默认情况下,VueRequest 使用<a href="https://en.wikipedia.org/wiki/Exponential_backoff" target="_blank" rel="noopener noreferrer"><strong>二进制指数退避算法</strong><span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" ariaHidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">在新窗口打开</span><!--]--></span></a> 来帮你计算出合适的间隔时间,你也可以通过设置 <code>errorRetryInterval</code> 来覆盖默认行为</p></li><li><p><strong>参考:</strong> <a href="/guide/documentation/errorRetry.html#%E9%87%8D%E8%AF%95%E9%97%B4%E9%9A%94%E6%97%B6%E9%97%B4" class="">错误重试间隔时间</a></p></li></ul><h3 id="manual" tabindex="-1"><a class="header-anchor" href="#manual" aria-hidden="true">#</a> manual</h3><ul><li><p><strong>类型:</strong> <code>boolean</code></p></li><li><p><strong>默认值:</strong> <code>false</code></p></li><li><p><strong>详情:</strong></p><p><code>manual</code> 设置为 <code>true</code> 时,你需要手动触发 <a href="#run"><code>run</code></a> 或者 <a href="#runAsync"><code>runAsync</code></a> 才会发起请求</p></li><li><p><strong>参考:</strong> <a href="/guide/documentation/manual.html" class="">手动请求</a></p></li></ul><h3 id="defaultparams" tabindex="-1"><a class="header-anchor" href="#defaultparams" aria-hidden="true">#</a> defaultParams</h3><ul><li><p><strong>类型:</strong> <code>P[]</code></p></li><li><p><strong>默认值:</strong> <code>[]</code></p></li><li><p><strong>详情:</strong></p><p>如果 <a href="#manual"><code>manual</code></a> 设置为 <code>false</code> ,在自动执行请求的时候,将会把 <code>defaultParams</code> 作为请求参数</p></li></ul><h3 id="ready" tabindex="-1"><a class="header-anchor" href="#ready" aria-hidden="true">#</a> ready <span class="badge tip" style="vertical-align:top;"><!--[-->响应式<!--]--></span></h3><ul><li><p><strong>类型:</strong> <code>Ref&lt;boolean&gt; | () =&gt; boolean</code></p></li><li><p><strong>默认值:</strong> <code>true</code></p></li><li><p><strong>详情:</strong></p><p>只有当 <code>ready</code><code>true</code> 时,才会发起请求。</p><ul><li>自动模式:当 <code>manual=false</code> 时,每次 <code>ready</code><code>false</code> 变为 <code>true</code> 时,都会自动发起请求,并且会带上参数 <code>options.defaultParams</code></li><li>手动模式:当 <code>manual=true</code> 时,只要 <code>ready</code><code>false</code>,则无法发起请求。</li></ul></li><li><p><strong>参考:</strong> <a href="/guide/documentation/ready.html" class="">依赖请求</a></p></li></ul><h3 id="initialdata" tabindex="-1"><a class="header-anchor" href="#initialdata" aria-hidden="true">#</a> initialData</h3><ul><li><p><strong>类型:</strong> <code>R</code></p></li><li><p><strong>默认值:</strong> <code>undefined</code></p></li><li><p><strong>详情:</strong></p><p>默认的 <a href="#data"><code>data</code></a></p></li></ul><h3 id="refreshdeps" tabindex="-1"><a class="header-anchor" href="#refreshdeps" aria-hidden="true">#</a> refreshDeps</h3><ul><li><p><strong>类型:</strong> <code>WatchSource&lt;any&gt; | WatchSource&lt;any&gt;[]</code></p></li><li><p><strong>默认值:</strong> <code>[]</code></p></li><li><p><strong>详情:</strong></p><p><code>refreshDeps</code> 里面的内容发生变化时,如果没有设置 <a href="#refreshdepsaction"><code>refreshDepsAction</code></a>, 就会触发 <code>refresh</code> 的重新执行。其本质只是对 <a href="https://v3.vuejs.org/guide/computed.html#watchers" target="_blank" rel="noopener noreferrer"><code>watch</code><span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" ariaHidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">在新窗口打开</span><!--]--></span></a> 的封装。</p><div class="language-javascript ext-js"><pre class="language-javascript"><code><span class="token function">watch</span><span class="token punctuation">(</span>refreshDeps<span class="token punctuation">,</span> refresh<span class="token punctuation">)</span><span class="token punctuation">;</span>
66-
</code></pre></div></li></ul><h3 id="refreshdepsaction" tabindex="-1"><a class="header-anchor" href="#refreshdepsaction" aria-hidden="true">#</a> refreshDepsAction</h3><ul><li><p><strong>类型:</strong> <code>() =&gt; void</code></p></li><li><p><strong>详情:</strong></p><p><code>refreshDeps</code> 里面的内容发生变化时,会被调用。<strong><code>manual=true</code> 时也会被触发</strong></p></li><li><p><strong>参考:</strong> <a href="/guide/documentation/refreshDeps.html#refreshdepsaction" class="">refreshDepsAction</a></p></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[]) =&gt; 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></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[]) =&gt; 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>类型:</strong> <code>(params: P[]) =&gt; void</code></p></li><li><p><strong>详情:</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>类型:</strong> <code>(params: P[]) =&gt; void</code></p></li><li><p><strong>详情:</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">2023/6/28 09:58:33</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.1d6bd3fc.js" defer></script><script src="/assets/js/621.6814818f.js" defer></script><script src="/assets/js/app.90e67ace.js" defer></script>
66+
</code></pre></div></li></ul><h3 id="refreshdepsaction" tabindex="-1"><a class="header-anchor" href="#refreshdepsaction" aria-hidden="true">#</a> refreshDepsAction</h3><ul><li><p><strong>类型:</strong> <code>() =&gt; void</code></p></li><li><p><strong>详情:</strong></p><p><code>refreshDeps</code> 里面的内容发生变化时,会被调用。<strong><code>manual=true</code> 时也会被触发</strong></p></li><li><p><strong>参考:</strong> <a href="/guide/documentation/refreshDeps.html#refreshdepsaction" class="">refreshDepsAction</a></p></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[]) =&gt; 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></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[]) =&gt; 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>类型:</strong> <code>(params: P[]) =&gt; void</code></p></li><li><p><strong>详情:</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>类型:</strong> <code>(params: P[]) =&gt; void</code></p></li><li><p><strong>详情:</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">2023/7/6 03:23:08</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.8fcb273b.js" defer></script><script src="/assets/js/621.6814818f.js" defer></script><script src="/assets/js/app.92b92359.js" defer></script>
6868
</body>
6969
</html>

0 commit comments

Comments
 (0)