File tree Expand file tree Collapse file tree 2 files changed +54
-0
lines changed Expand file tree Collapse file tree 2 files changed +54
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,33 @@ Client API can be imported from `vuepress/client`.
4
4
5
5
## Composition API
6
6
7
+ ### useClientData
8
+
9
+ - Details:
10
+
11
+ Returns all the client data ref objects.
12
+
13
+ Each property can also be accessed by the following composition APIs.
14
+
15
+ - Example:
16
+
17
+ ``` vue
18
+ <script setup lang="ts">
19
+ import { useClientData } from 'vuepress/client'
20
+
21
+ const {
22
+ pageData,
23
+ pageFrontmatter,
24
+ pageHead,
25
+ pageHeadTitle,
26
+ pageLang,
27
+ routeLocale,
28
+ siteData,
29
+ siteLocaleData,
30
+ } = useClientData()
31
+ </script>
32
+ ```
33
+
7
34
### usePageData
8
35
9
36
- Details:
Original file line number Diff line number Diff line change 4
4
5
5
## 组合式 API
6
6
7
+ ### useClientData
8
+
9
+ - 详情:
10
+
11
+ 返回所有客户端数据的 Ref 对象。
12
+
13
+ 每个属性也可以通过下列的组合式 API 来访问。
14
+
15
+ - 示例:
16
+
17
+ ``` vue
18
+ <script setup lang="ts">
19
+ import { useClientData } from 'vuepress/client'
20
+
21
+ const {
22
+ pageData,
23
+ pageFrontmatter,
24
+ pageHead,
25
+ pageHeadTitle,
26
+ pageLang,
27
+ routeLocale,
28
+ siteData,
29
+ siteLocaleData,
30
+ } = useClientData()
31
+ </script>
32
+ ```
33
+
7
34
### usePageData
8
35
9
36
- 详情:
You can’t perform that action at this time.
0 commit comments