-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathapi-examples.html
252 lines (249 loc) · 32.1 KB
/
api-examples.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
<!DOCTYPE html>
<html lang="zh-Hans" dir="ltr">
<head>
<meta charset="utf-8">
<title>Runtime API Examples | snail-uni</title>
<meta name="description" content="uni-app最佳开发模版">
<meta name="generator" content="VitePress v1.5.0">
<link rel="preload stylesheet" href="/snail-uni/assets/style.Bf0Maxjq.css" as="style">
<link rel="preload stylesheet" href="/snail-uni/vp-icons.css" as="style">
<script type="module" src="/snail-uni/assets/app.BdLLhggi.js"></script>
<link rel="preload" href="/snail-uni/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
<link rel="modulepreload" href="/snail-uni/assets/chunks/theme.7knFVGLh.js">
<link rel="modulepreload" href="/snail-uni/assets/chunks/framework.CvjUncBj.js">
<link rel="modulepreload" href="/snail-uni/assets/api-examples.md.CPnsU17U.lean.js">
<meta name="author" content="hu-snail">
<meta name="keywords" content="uni-app, snail-uni, vite, vitepress, vue3">
<link rel="icon" type="image/svg+xml" href="/logo.png">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<script src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" defer></script>
<script>var _hmt=_hmt||[];(function(){var e=document.createElement("script");e.src="https://hm.baidu.com/hm.js?e86ba2b14d9592ffd01c57ef4611af14";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)})();</script>
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
<script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
</head>
<body>
<div id="app"><div class="Layout" data-v-4f71ccd3 data-v-37d90e64><!--[--><!--]--><!--[--><span tabindex="-1" data-v-cec26f19></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-cec26f19> Skip to content </a><!--]--><!----><header class="VPNav" data-v-37d90e64 data-v-96c8d5e8><div class="VPNavBar" data-v-96c8d5e8 data-v-f0f1b119><div class="wrapper" data-v-f0f1b119><div class="container" data-v-f0f1b119><div class="title" data-v-f0f1b119><div class="VPNavBarTitle" data-v-f0f1b119 data-v-6e31ecd5><a class="title" href="/snail-uni/" data-v-6e31ecd5><!--[--><!--]--><!--[--><img class="VPImage logo" src="/snail-uni/logo.png" alt data-v-95a3a51c><!--]--><span data-v-6e31ecd5>snail-uni</span><!--[--><!--]--></a></div></div><div class="content" data-v-f0f1b119><div class="content-body" data-v-f0f1b119><!--[--><!--]--><div class="VPNavBarSearch search" data-v-f0f1b119><!--[--><!----><div id="local-search"><button type="button" class="DocSearch DocSearch-Button" aria-label="搜索文档"><span class="DocSearch-Button-Container"><span class="vp-icon DocSearch-Search-Icon"></span><span class="DocSearch-Button-Placeholder">搜索文档</span></span><span class="DocSearch-Button-Keys"><kbd class="DocSearch-Button-Key"></kbd><kbd class="DocSearch-Button-Key">K</kbd></span></button></div><!--]--></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-f0f1b119 data-v-a4d7558b><span id="main-nav-aria-label" class="visually-hidden" data-v-a4d7558b> Main Navigation </span><!--[--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/snail-uni/guide/intro.html" tabindex="0" data-v-a4d7558b data-v-7f523900><!--[--><span data-v-7f523900>指南</span><!--]--></a><!--]--><!--[--><div class="VPFlyout VPNavBarMenuGroup" data-v-a4d7558b data-v-80ad33b8><button type="button" class="button" aria-haspopup="true" aria-expanded="false" data-v-80ad33b8><span class="text" data-v-80ad33b8><!----><span data-v-80ad33b8>开源作品</span><span class="vpi-chevron-down text-icon" data-v-80ad33b8></span></span></button><div class="menu" data-v-80ad33b8><div class="VPMenu" data-v-80ad33b8 data-v-1e9846dd><div class="items" data-v-1e9846dd><!--[--><!--[--><div class="VPMenuLink" data-v-1e9846dd data-v-c31a2b7a><a class="VPLink link vp-external-link-icon" href="https://hu-snail.github.io/vue3-resource/" target="_blank" rel="noreferrer" data-v-c31a2b7a><!--[--><span data-v-c31a2b7a>Vue3-resource</span><!--]--></a></div><!--]--><!--[--><div class="VPMenuLink" data-v-1e9846dd data-v-c31a2b7a><a class="VPLink link vp-external-link-icon" href="https://github.com/hu-snail/vue3-admin-element-template" target="_blank" rel="noreferrer" data-v-c31a2b7a><!--[--><span data-v-c31a2b7a>Vue3-admin-element-template</span><!--]--></a></div><!--]--><!--[--><div class="VPMenuLink" data-v-1e9846dd data-v-c31a2b7a><a class="VPLink link vp-external-link-icon" href="https://github.com/hu-snail/arco-admin-template" target="_blank" rel="noreferrer" data-v-c31a2b7a><!--[--><span data-v-c31a2b7a>Arco-admin-template</span><!--]--></a></div><!--]--><!--]--></div><!--[--><!--]--></div></div></div><!--]--><!--[--><div class="VPFlyout VPNavBarMenuGroup" data-v-a4d7558b data-v-80ad33b8><button type="button" class="button" aria-haspopup="true" aria-expanded="false" data-v-80ad33b8><span class="text" data-v-80ad33b8><!----><span data-v-80ad33b8>相关链接</span><span class="vpi-chevron-down text-icon" data-v-80ad33b8></span></span></button><div class="menu" data-v-80ad33b8><div class="VPMenu" data-v-80ad33b8 data-v-1e9846dd><div class="items" data-v-1e9846dd><!--[--><!--[--><div class="VPMenuLink" data-v-1e9846dd data-v-c31a2b7a><a class="VPLink link vp-external-link-icon" href="https://uniapp.dcloud.net.cn/" target="_blank" rel="noreferrer" data-v-c31a2b7a><!--[--><span data-v-c31a2b7a>Uni App 文档</span><!--]--></a></div><!--]--><!--[--><div class="VPMenuLink" data-v-1e9846dd data-v-c31a2b7a><a class="VPLink link vp-external-link-icon" href="https://github.com/uni-helper" target="_blank" rel="noreferrer" data-v-c31a2b7a><!--[--><span data-v-c31a2b7a>Uni Helper 团队</span><!--]--></a></div><!--]--><!--[--><div class="VPMenuLink" data-v-1e9846dd data-v-c31a2b7a><a class="VPLink link vp-external-link-icon" href="https://wot-design-uni.pages.dev" target="_blank" rel="noreferrer" data-v-c31a2b7a><!--[--><span data-v-c31a2b7a>Wot-design-uni 文档</span><!--]--></a></div><!--]--><!--[--><div class="VPMenuLink" data-v-1e9846dd data-v-c31a2b7a><a class="VPLink link vp-external-link-icon" href="https://www.uvui.cn/" target="_blank" rel="noreferrer" data-v-c31a2b7a><!--[--><span data-v-c31a2b7a>Uv-ui 文档</span><!--]--></a></div><!--]--><!--[--><div class="VPMenuLink" data-v-1e9846dd data-v-c31a2b7a><a class="VPLink link vp-external-link-icon" href="https://uiadmin.net/uview-plus/" target="_blank" rel="noreferrer" data-v-c31a2b7a><!--[--><span data-v-c31a2b7a>Uview-plus 文档</span><!--]--></a></div><!--]--><!--[--><div class="VPMenuLink" data-v-1e9846dd data-v-c31a2b7a><a class="VPLink link vp-external-link-icon" href="https://pinia.vuejs.org/zh/" target="_blank" rel="noreferrer" data-v-c31a2b7a><!--[--><span data-v-c31a2b7a>Pinia 文档</span><!--]--></a></div><!--]--><!--[--><div class="VPMenuLink" data-v-1e9846dd data-v-c31a2b7a><a class="VPLink link vp-external-link-icon" href="https://moonofweisheng.github.io/uni-mini-router/" target="_blank" rel="noreferrer" data-v-c31a2b7a><!--[--><span data-v-c31a2b7a>uni-mini-router 文档</span><!--]--></a></div><!--]--><!--]--></div><!--[--><!--]--></div></div></div><!--]--><!--]--></nav><!----><div class="VPNavBarAppearance appearance" data-v-f0f1b119 data-v-82ba38b7><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title aria-checked="false" data-v-82ba38b7 data-v-065ba82f data-v-672bf23c><span class="check" data-v-672bf23c><span class="icon" data-v-672bf23c><!--[--><span class="vpi-sun sun" data-v-065ba82f></span><span class="vpi-moon moon" data-v-065ba82f></span><!--]--></span></span></button></div><div class="VPSocialLinks VPNavBarSocialLinks social-links" data-v-f0f1b119 data-v-dedd63cc data-v-92c9e1cb><!--[--><a class="VPSocialLink no-icon" href="https://github.com/hu-snail/snail-uni" aria-label="github" target="_blank" rel="noopener" data-v-92c9e1cb data-v-17e250ef><span class="vpi-social-github"></span></a><a class="VPSocialLink no-icon" href="https://gitee.com/hu-snail/snail-uni" aria-label="Gitee" target="_blank" rel="noopener" data-v-92c9e1cb data-v-17e250ef><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="#c71d23" d="M11.984 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12a12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.016 0m6.09 5.333c.328 0 .593.266.592.593v1.482a.594.594 0 0 1-.593.592H9.777c-.982 0-1.778.796-1.778 1.778v5.63c0 .327.266.592.593.592h5.63c.982 0 1.778-.796 1.778-1.778v-.296a.593.593 0 0 0-.592-.593h-4.15a.592.592 0 0 1-.592-.592v-1.482a.593.593 0 0 1 .593-.592h6.815c.327 0 .593.265.593.592v3.408a4 4 0 0 1-4 4H5.926a.593.593 0 0 1-.593-.593V9.778a4.444 4.444 0 0 1 4.445-4.444h8.296Z"/></svg></a><a class="VPSocialLink no-icon" href="https://juejin.cn/user/1662117310637757" aria-label="掘金" target="_blank" rel="noopener" data-v-92c9e1cb data-v-17e250ef><svg width="36" height="28" viewBox="0 0 36 28" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M17.5875 6.77268L21.8232 3.40505L17.5875 0.00748237L17.5837 0L13.3555 3.39757L17.5837 6.76894L17.5875 6.77268ZM17.5863 17.3955H17.59L28.5161 8.77432L25.5526 6.39453L17.59 12.6808H17.5863L17.5825 12.6845L9.61993 6.40201L6.66016 8.78181L17.5825 17.3992L17.5863 17.3955ZM17.5828 23.2891L17.5865 23.2854L32.2133 11.7456L35.1768 14.1254L28.5238 19.3752L17.5865 28L0.284376 14.3574L0 14.1291L2.95977 11.7531L17.5828 23.2891Z" fill="#1E80FF"/>
</svg>
</a><!--]--></div><div class="VPFlyout VPNavBarExtra extra" data-v-f0f1b119 data-v-99352bf3 data-v-80ad33b8><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="extra navigation" data-v-80ad33b8><span class="vpi-more-horizontal icon" data-v-80ad33b8></span></button><div class="menu" data-v-80ad33b8><div class="VPMenu" data-v-80ad33b8 data-v-1e9846dd><!----><!--[--><!--[--><!----><div class="group" data-v-99352bf3><div class="item appearance" data-v-99352bf3><p class="label" data-v-99352bf3>主题</p><div class="appearance-action" data-v-99352bf3><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title aria-checked="false" data-v-99352bf3 data-v-065ba82f data-v-672bf23c><span class="check" data-v-672bf23c><span class="icon" data-v-672bf23c><!--[--><span class="vpi-sun sun" data-v-065ba82f></span><span class="vpi-moon moon" data-v-065ba82f></span><!--]--></span></span></button></div></div></div><div class="group" data-v-99352bf3><div class="item social-links" data-v-99352bf3><div class="VPSocialLinks social-links-list" data-v-99352bf3 data-v-92c9e1cb><!--[--><a class="VPSocialLink no-icon" href="https://github.com/hu-snail/snail-uni" aria-label="github" target="_blank" rel="noopener" data-v-92c9e1cb data-v-17e250ef><span class="vpi-social-github"></span></a><a class="VPSocialLink no-icon" href="https://gitee.com/hu-snail/snail-uni" aria-label="Gitee" target="_blank" rel="noopener" data-v-92c9e1cb data-v-17e250ef><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="#c71d23" d="M11.984 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12a12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.016 0m6.09 5.333c.328 0 .593.266.592.593v1.482a.594.594 0 0 1-.593.592H9.777c-.982 0-1.778.796-1.778 1.778v5.63c0 .327.266.592.593.592h5.63c.982 0 1.778-.796 1.778-1.778v-.296a.593.593 0 0 0-.592-.593h-4.15a.592.592 0 0 1-.592-.592v-1.482a.593.593 0 0 1 .593-.592h6.815c.327 0 .593.265.593.592v3.408a4 4 0 0 1-4 4H5.926a.593.593 0 0 1-.593-.593V9.778a4.444 4.444 0 0 1 4.445-4.444h8.296Z"/></svg></a><a class="VPSocialLink no-icon" href="https://juejin.cn/user/1662117310637757" aria-label="掘金" target="_blank" rel="noopener" data-v-92c9e1cb data-v-17e250ef><svg width="36" height="28" viewBox="0 0 36 28" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M17.5875 6.77268L21.8232 3.40505L17.5875 0.00748237L17.5837 0L13.3555 3.39757L17.5837 6.76894L17.5875 6.77268ZM17.5863 17.3955H17.59L28.5161 8.77432L25.5526 6.39453L17.59 12.6808H17.5863L17.5825 12.6845L9.61993 6.40201L6.66016 8.78181L17.5825 17.3992L17.5863 17.3955ZM17.5828 23.2891L17.5865 23.2854L32.2133 11.7456L35.1768 14.1254L28.5238 19.3752L17.5865 28L0.284376 14.3574L0 14.1291L2.95977 11.7531L17.5828 23.2891Z" fill="#1E80FF"/>
</svg>
</a><!--]--></div></div></div><!--]--><!--]--></div></div></div><!--[--><!--]--><button type="button" class="VPNavBarHamburger hamburger" aria-label="mobile navigation" aria-expanded="false" aria-controls="VPNavScreen" data-v-f0f1b119 data-v-e5085deb><span class="container" data-v-e5085deb><span class="top" data-v-e5085deb></span><span class="middle" data-v-e5085deb></span><span class="bottom" data-v-e5085deb></span></span></button></div></div></div></div><div class="divider" data-v-f0f1b119><div class="divider-line" data-v-f0f1b119></div></div></div><!----></header><div class="VPLocalNav empty fixed" data-v-37d90e64 data-v-e32ace96><div class="container" data-v-e32ace96><!----><div class="VPLocalNavOutlineDropdown" style="--vp-vh:0px;" data-v-e32ace96 data-v-4e9d4b35><button data-v-4e9d4b35>回到顶部</button><!----></div></div></div><!----><div class="VPContent" id="VPContent" data-v-37d90e64 data-v-c0f7e0d1><div class="VPDoc has-aside" data-v-c0f7e0d1 data-v-367517f1><!--[--><!--]--><div class="container" data-v-367517f1><div class="aside" data-v-367517f1><div class="aside-curtain" data-v-367517f1></div><div class="aside-container" data-v-367517f1><div class="aside-content" data-v-367517f1><div class="VPDocAside" data-v-367517f1 data-v-3d13cce3><!--[--><!--]--><!--[--><!--]--><nav aria-labelledby="doc-outline-aria-label" class="VPDocAsideOutline" data-v-3d13cce3 data-v-af656f4f><div class="content" data-v-af656f4f><div class="outline-marker" data-v-af656f4f></div><div aria-level="2" class="outline-title" id="doc-outline-aria-label" role="heading" data-v-af656f4f>页面导航</div><ul class="VPDocOutlineItem root" data-v-af656f4f data-v-cd1d331b><!--[--><!--]--></ul></div></nav><!--[--><!--]--><div class="spacer" data-v-3d13cce3></div><!--[--><!--]--><!----><!--[--><!--]--><!--[--><!--]--></div></div></div></div><div class="content" data-v-367517f1><div class="content-container" data-v-367517f1><!--[--><!--]--><main class="main" data-v-367517f1><div style="position:relative;" class="vp-doc _snail-uni_api-examples" data-v-367517f1><div><h1 id="runtime-api-examples" tabindex="-1">Runtime API Examples <a class="header-anchor" href="#runtime-api-examples" aria-label="Permalink to "Runtime API Examples""></a></h1><p>This page demonstrates usage of some of the runtime APIs provided by VitePress.</p><p>The main <code>useData()</code> API can be used to access site, theme, and page data for the current page. It works in both <code>.md</code> and <code>.vue</code> files:</p><div class="language-md vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">md</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><script setup></span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">import { useData } from 'vitepress'</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">const { theme, page, frontmatter } = useData()</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"></script></span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-light-font-weight:bold;--shiki-dark:#79B8FF;--shiki-dark-font-weight:bold;">## Results</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-light-font-weight:bold;--shiki-dark:#79B8FF;--shiki-dark-font-weight:bold;">### Theme Data</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><pre>{{ theme }}</pre></span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-light-font-weight:bold;--shiki-dark:#79B8FF;--shiki-dark-font-weight:bold;">### Page Data</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><pre>{{ page }}</pre></span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-light-font-weight:bold;--shiki-dark:#79B8FF;--shiki-dark-font-weight:bold;">### Page Frontmatter</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><pre>{{ frontmatter }}</pre></span></span></code></pre></div><h2 id="results" tabindex="-1">Results <a class="header-anchor" href="#results" aria-label="Permalink to "Results""></a></h2><h3 id="theme-data" tabindex="-1">Theme Data <a class="header-anchor" href="#theme-data" aria-label="Permalink to "Theme Data""></a></h3><pre>{
"logo": "/logo.png",
"nav": [
{
"text": "指南",
"link": "/guide/intro"
},
{
"text": "开源作品",
"items": [
{
"text": "Vue3-resource",
"link": "https://hu-snail.github.io/vue3-resource/"
},
{
"text": "Vue3-admin-element-template",
"link": "https://github.com/hu-snail/vue3-admin-element-template"
},
{
"text": "Arco-admin-template",
"link": "https://github.com/hu-snail/arco-admin-template"
}
]
},
{
"text": "相关链接",
"items": [
{
"text": "Uni App 文档",
"link": "https://uniapp.dcloud.net.cn/"
},
{
"text": "Uni Helper 团队",
"link": "https://github.com/uni-helper"
},
{
"text": "Wot-design-uni 文档",
"link": "https://wot-design-uni.pages.dev"
},
{
"text": "Uv-ui 文档",
"link": "https://www.uvui.cn/"
},
{
"text": "Uview-plus 文档",
"link": "https://uiadmin.net/uview-plus/"
},
{
"text": "Pinia 文档",
"link": "https://pinia.vuejs.org/zh/"
},
{
"text": "uni-mini-router 文档",
"link": "https://moonofweisheng.github.io/uni-mini-router/"
}
]
}
],
"sidebar": {
"/guide/": {
"base": "/guide/",
"items": [
{
"text": "指南",
"items": [
{
"text": "介绍",
"link": "intro"
},
{
"text": "快速上手",
"link": "quick-start"
},
{
"text": "代码规范篇",
"link": "code-style"
},
{
"text": "插件篇",
"link": "uni-plugins"
},
{
"text": "图标篇",
"link": "icon"
},
{
"text": "UI选型篇",
"link": "ui"
},
{
"text": "UI使用篇",
"link": "ui-use"
},
{
"text": "Axios请求",
"link": "axios"
},
{
"text": "Pinia状态",
"link": "pinia"
},
{
"text": "路由篇",
"link": "router"
},
{
"text": "环境配置",
"link": "env"
},
{
"text": "常见问题",
"link": "question"
}
]
}
]
}
},
"socialLinks": [
{
"icon": "github",
"link": "https://github.com/hu-snail/snail-uni"
},
{
"icon": {
"svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"32\" height=\"32\" viewBox=\"0 0 24 24\"><path fill=\"#c71d23\" d=\"M11.984 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12a12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.016 0m6.09 5.333c.328 0 .593.266.592.593v1.482a.594.594 0 0 1-.593.592H9.777c-.982 0-1.778.796-1.778 1.778v5.63c0 .327.266.592.593.592h5.63c.982 0 1.778-.796 1.778-1.778v-.296a.593.593 0 0 0-.592-.593h-4.15a.592.592 0 0 1-.592-.592v-1.482a.593.593 0 0 1 .593-.592h6.815c.327 0 .593.265.593.592v3.408a4 4 0 0 1-4 4H5.926a.593.593 0 0 1-.593-.593V9.778a4.444 4.444 0 0 1 4.445-4.444h8.296Z\"/></svg>"
},
"link": "https://gitee.com/hu-snail/snail-uni",
"ariaLabel": "Gitee"
},
{
"icon": {
"svg": "<svg width=\"36\" height=\"28\" viewBox=\"0 0 36 28\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M17.5875 6.77268L21.8232 3.40505L17.5875 0.00748237L17.5837 0L13.3555 3.39757L17.5837 6.76894L17.5875 6.77268ZM17.5863 17.3955H17.59L28.5161 8.77432L25.5526 6.39453L17.59 12.6808H17.5863L17.5825 12.6845L9.61993 6.40201L6.66016 8.78181L17.5825 17.3992L17.5863 17.3955ZM17.5828 23.2891L17.5865 23.2854L32.2133 11.7456L35.1768 14.1254L28.5238 19.3752L17.5865 28L0.284376 14.3574L0 14.1291L2.95977 11.7531L17.5828 23.2891Z\" fill=\"#1E80FF\"/>\n </svg>\n "
},
"link": "https://juejin.cn/user/1662117310637757",
"ariaLabel": "掘金"
}
],
"footer": {
"message": "基于 MIT 许可发布",
"copyright": "版权所有 © 2024 hu-snail(蜗牛前端)"
},
"outline": {
"label": "页面导航",
"level": "deep"
},
"docFooter": {
"prev": "上一页",
"next": "下一页"
},
"lastUpdated": {
"text": "最后更新于",
"formatOptions": {
"dateStyle": "short",
"timeStyle": "medium"
}
},
"search": {
"provider": "local",
"options": {
"translations": {
"button": {
"buttonText": "搜索文档",
"buttonAriaLabel": "搜索文档"
},
"modal": {
"displayDetails": "显示详细列表",
"resetButtonTitle": "重置搜索",
"backButtonTitle": "关闭搜索",
"noResultsText": "没有结果",
"footer": {
"selectText": "选择",
"selectKeyAriaLabel": "输入",
"navigateText": "导航",
"navigateUpKeyAriaLabel": "上箭头",
"navigateDownKeyAriaLabel": "下箭头",
"closeText": "关闭",
"closeKeyAriaLabel": "esc"
}
}
}
}
},
"returnToTopLabel": "回到顶部",
"sidebarMenuLabel": "菜单",
"darkModeSwitchLabel": "主题",
"lightModeSwitchTitle": "切换到浅色模式",
"darkModeSwitchTitle": "切换到深色模式"
}</pre><h3 id="page-data" tabindex="-1">Page Data <a class="header-anchor" href="#page-data" aria-label="Permalink to "Page Data""></a></h3><pre>{
"title": "Runtime API Examples",
"description": "",
"frontmatter": {
"outline": "deep"
},
"headers": [],
"relativePath": "api-examples.md",
"filePath": "api-examples.md",
"lastUpdated": 1722096440000
}</pre><h3 id="page-frontmatter" tabindex="-1">Page Frontmatter <a class="header-anchor" href="#page-frontmatter" aria-label="Permalink to "Page Frontmatter""></a></h3><pre>{
"outline": "deep"
}</pre><h2 id="more" tabindex="-1">More <a class="header-anchor" href="#more" aria-label="Permalink to "More""></a></h2><p>Check out the documentation for the <a href="https://vitepress.dev/reference/runtime-api#usedata" target="_blank" rel="noreferrer">full list of runtime APIs</a>.</p></div></div></main><footer class="VPDocFooter" data-v-367517f1 data-v-96a36422><!--[--><!--]--><div class="edit-info" data-v-96a36422><!----><div class="last-updated" data-v-96a36422><p class="VPLastUpdated" data-v-96a36422 data-v-ba692457>最后更新于: <time datetime="2024-07-27T16:07:20.000Z" data-v-ba692457></time></p></div></div><!----></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><footer class="VPFooter" data-v-37d90e64 data-v-ffe053e6><div class="container" data-v-ffe053e6><p class="message" data-v-ffe053e6>基于 MIT 许可发布</p><p class="copyright" data-v-ffe053e6>版权所有 © 2024 hu-snail(蜗牛前端)</p></div></footer><!--[--><div class="busuanzi-container" data-v-4f71ccd3><span id="busuanzi_container_site_pv" data-v-4f71ccd3> 本站总访问量<span id="busuanzi_value_site_pv" data-v-4f71ccd3></span>次 </span><span id="busuanzi_container_site_uv" data-v-4f71ccd3> 本站总访客数<span id="busuanzi_value_site_uv" data-v-4f71ccd3></span>人 </span><span id="busuanzi_container_page_pv" data-v-4f71ccd3> 本文总阅读量<span id="busuanzi_value_page_pv" data-v-4f71ccd3></span>次 </span></div><!--]--></div></div>
<script>window.__VP_HASH_MAP__=JSON.parse("{\"api-examples.md\":\"CPnsU17U\",\"guide_axios.md\":\"CefmRs2f\",\"guide_code-style.md\":\"BL1oQZB_\",\"guide_env.md\":\"BodT1JTT\",\"guide_icon.md\":\"Cna6wS0N\",\"guide_intro.md\":\"BsiuPwA2\",\"guide_pinia.md\":\"vZ7GztF0\",\"guide_question.md\":\"p8jGcO2e\",\"guide_quick-start.md\":\"BXmay7ii\",\"guide_request.md\":\"DSTBonz3\",\"guide_router.md\":\"WnjaZR5w\",\"guide_ui-use.md\":\"B__ET5xx\",\"guide_ui.md\":\"Y9AkmaL0\",\"guide_uni-plugins.md\":\"OS6Gu5Jm\",\"index.md\":\"D05pVxcw\",\"markdown-examples.md\":\"CVbmfCpE\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"zh-Hans\",\"dir\":\"ltr\",\"title\":\"snail-uni\",\"description\":\"uni-app最佳开发模版\",\"base\":\"/snail-uni/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"/logo.png\",\"nav\":[{\"text\":\"指南\",\"link\":\"/guide/intro\"},{\"text\":\"开源作品\",\"items\":[{\"text\":\"Vue3-resource\",\"link\":\"https://hu-snail.github.io/vue3-resource/\"},{\"text\":\"Vue3-admin-element-template\",\"link\":\"https://github.com/hu-snail/vue3-admin-element-template\"},{\"text\":\"Arco-admin-template\",\"link\":\"https://github.com/hu-snail/arco-admin-template\"}]},{\"text\":\"相关链接\",\"items\":[{\"text\":\"Uni App 文档\",\"link\":\"https://uniapp.dcloud.net.cn/\"},{\"text\":\"Uni Helper 团队\",\"link\":\"https://github.com/uni-helper\"},{\"text\":\"Wot-design-uni 文档\",\"link\":\"https://wot-design-uni.pages.dev\"},{\"text\":\"Uv-ui 文档\",\"link\":\"https://www.uvui.cn/\"},{\"text\":\"Uview-plus 文档\",\"link\":\"https://uiadmin.net/uview-plus/\"},{\"text\":\"Pinia 文档\",\"link\":\"https://pinia.vuejs.org/zh/\"},{\"text\":\"uni-mini-router 文档\",\"link\":\"https://moonofweisheng.github.io/uni-mini-router/\"}]}],\"sidebar\":{\"/guide/\":{\"base\":\"/guide/\",\"items\":[{\"text\":\"指南\",\"items\":[{\"text\":\"介绍\",\"link\":\"intro\"},{\"text\":\"快速上手\",\"link\":\"quick-start\"},{\"text\":\"代码规范篇\",\"link\":\"code-style\"},{\"text\":\"插件篇\",\"link\":\"uni-plugins\"},{\"text\":\"图标篇\",\"link\":\"icon\"},{\"text\":\"UI选型篇\",\"link\":\"ui\"},{\"text\":\"UI使用篇\",\"link\":\"ui-use\"},{\"text\":\"Axios请求\",\"link\":\"axios\"},{\"text\":\"Pinia状态\",\"link\":\"pinia\"},{\"text\":\"路由篇\",\"link\":\"router\"},{\"text\":\"环境配置\",\"link\":\"env\"},{\"text\":\"常见问题\",\"link\":\"question\"}]}]}},\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/hu-snail/snail-uni\"},{\"icon\":{\"svg\":\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"32\\\" height=\\\"32\\\" viewBox=\\\"0 0 24 24\\\"><path fill=\\\"#c71d23\\\" d=\\\"M11.984 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12a12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.016 0m6.09 5.333c.328 0 .593.266.592.593v1.482a.594.594 0 0 1-.593.592H9.777c-.982 0-1.778.796-1.778 1.778v5.63c0 .327.266.592.593.592h5.63c.982 0 1.778-.796 1.778-1.778v-.296a.593.593 0 0 0-.592-.593h-4.15a.592.592 0 0 1-.592-.592v-1.482a.593.593 0 0 1 .593-.592h6.815c.327 0 .593.265.593.592v3.408a4 4 0 0 1-4 4H5.926a.593.593 0 0 1-.593-.593V9.778a4.444 4.444 0 0 1 4.445-4.444h8.296Z\\\"/></svg>\"},\"link\":\"https://gitee.com/hu-snail/snail-uni\",\"ariaLabel\":\"Gitee\"},{\"icon\":{\"svg\":\"<svg width=\\\"36\\\" height=\\\"28\\\" viewBox=\\\"0 0 36 28\\\" fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n <path fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" d=\\\"M17.5875 6.77268L21.8232 3.40505L17.5875 0.00748237L17.5837 0L13.3555 3.39757L17.5837 6.76894L17.5875 6.77268ZM17.5863 17.3955H17.59L28.5161 8.77432L25.5526 6.39453L17.59 12.6808H17.5863L17.5825 12.6845L9.61993 6.40201L6.66016 8.78181L17.5825 17.3992L17.5863 17.3955ZM17.5828 23.2891L17.5865 23.2854L32.2133 11.7456L35.1768 14.1254L28.5238 19.3752L17.5865 28L0.284376 14.3574L0 14.1291L2.95977 11.7531L17.5828 23.2891Z\\\" fill=\\\"#1E80FF\\\"/>\\n </svg>\\n \"},\"link\":\"https://juejin.cn/user/1662117310637757\",\"ariaLabel\":\"掘金\"}],\"footer\":{\"message\":\"基于 MIT 许可发布\",\"copyright\":\"版权所有 © 2024 hu-snail(蜗牛前端)\"},\"outline\":{\"label\":\"页面导航\",\"level\":\"deep\"},\"docFooter\":{\"prev\":\"上一页\",\"next\":\"下一页\"},\"lastUpdated\":{\"text\":\"最后更新于\",\"formatOptions\":{\"dateStyle\":\"short\",\"timeStyle\":\"medium\"}},\"search\":{\"provider\":\"local\",\"options\":{\"translations\":{\"button\":{\"buttonText\":\"搜索文档\",\"buttonAriaLabel\":\"搜索文档\"},\"modal\":{\"displayDetails\":\"显示详细列表\",\"resetButtonTitle\":\"重置搜索\",\"backButtonTitle\":\"关闭搜索\",\"noResultsText\":\"没有结果\",\"footer\":{\"selectText\":\"选择\",\"selectKeyAriaLabel\":\"输入\",\"navigateText\":\"导航\",\"navigateUpKeyAriaLabel\":\"上箭头\",\"navigateDownKeyAriaLabel\":\"下箭头\",\"closeText\":\"关闭\",\"closeKeyAriaLabel\":\"esc\"}}}}},\"returnToTopLabel\":\"回到顶部\",\"sidebarMenuLabel\":\"菜单\",\"darkModeSwitchLabel\":\"主题\",\"lightModeSwitchTitle\":\"切换到浅色模式\",\"darkModeSwitchTitle\":\"切换到深色模式\"},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
</body>
</html>