Skip to content

Commit 4a148d8

Browse files
authored
Merge pull request #80 from InhiblabCore/dev
docs: docs optimized
2 parents defc5b7 + 8346f85 commit 4a148d8

Some content is hidden

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

41 files changed

+162
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"@types/node": "^17.0.21",
3232
"@types/qs": "^6.9.7",
3333
"@vitejs/plugin-vue": "^2.3.1",
34-
"@vue-hooks-plus/vite-plugin-gen-temp": "2.6.2",
34+
"@vue-hooks-plus/vite-plugin-gen-temp": "^2.6.6",
3535
"@vue-hooks-plus/md-demo-plugins": "^1.0.0",
3636
"@vue-hooks-plus/vitepress": "1.2.3",
3737
"@vue-hooks-plus/vitepress-demo-block": "^1.3.1",

packages/hooks/docs/guide/index.en-US.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
source:
3+
show: false
4+
---
5+
16
<script setup>
27
import Badge from '@theme/home/Badge.vue'
38
import Icon from '@theme/home/Icon.vue'

packages/hooks/docs/guide/index.zh-CN.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
source:
3+
show: false
4+
---
5+
16
<script setup>
27
import Badge from '@theme/home/Badge.vue'
38
import Icon from '@theme/home/Icon.vue'

packages/hooks/docs/index.en-US.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
layout: home
33
sidebar: false
4+
source:
5+
show: false
46
---
57

68
<script setup>

packages/hooks/docs/index.zh-CN.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
layout: home
33
sidebar: false
4+
source:
5+
show: false
46
---
57

68
<script setup>

packages/hooks/src/useImmer/index.en-US.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,16 @@ npm i @vue-hooks-plus/use-immer
2626
language="vue"
2727
title="basic Usage"
2828
desc=""> </demo>
29+
30+
## Params
31+
32+
| Property | Description | Type | Default |
33+
| -------- | ----------- | --------------- | ------- |
34+
| state | ShallowRef | `ShallowRef<S>` | - |
35+
| updater | - | `Updater<S>` | - |
36+
37+
## Options
38+
39+
| 参数 | 说明 | 类型 | 默认值 |
40+
| ------------ | ---- | ------------ | ------ |
41+
| initialValue | - | `() => void` | `any` |

packages/hooks/src/useImmer/index.zh-CN.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
map:
33
# 映射到docs的路径
44
path: /useImmer
5+
source:
6+
path: https://github.com/InhiblabCore/vue-hooks-plus/blob/master/packages/use-immer/src/index.ts
57
---
68

79
# useImmer
@@ -26,3 +28,22 @@ npm i @vue-hooks-plus/use-immer
2628
language="vue"
2729
title="基本用法"
2830
desc=""> </demo>
31+
32+
## API
33+
34+
```typescript
35+
const [state, updater] = useImmer(initialValue)
36+
```
37+
38+
## Params
39+
40+
| 参数 | 说明 | 类型 | 默认值 |
41+
| ------- | ---------- | --------------- | ------ |
42+
| state | 响应式对象 | `ShallowRef<S>` | - |
43+
| updater | 改变值 | `Updater<S>` | - |
44+
45+
## Options
46+
47+
| Property | Description | Type | Default |
48+
| ------------ | ------------ | ------------ | ------- |
49+
| initialValue | hover 时触发 | `() => void` | `any` |

packages/hooks/src/useRequest/docs/basic/index.en-US.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
map:
33
# Path mapped to docs
44
path: /useRequest/basic/
5+
source:
6+
path: https://github.com/InhiblabCore/vue-hooks-plus/blob/master/packages/hooks/src/useRequest/useRequest.ts
7+
demoPath: https://github.com/InhiblabCore/vue-hooks-plus/blob/master/packages/hooks/src/useRequest/docs/basic/demo
58
---
69

710
# useRequest Basic usage

packages/hooks/src/useRequest/docs/basic/index.zh-CN.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
map:
33
# 映射到docs的路径
44
path: /useRequest/basic/
5+
source:
6+
path: https://github.com/InhiblabCore/vue-hooks-plus/blob/master/packages/hooks/src/useRequest/useRequest.ts
7+
demoPath: https://github.com/InhiblabCore/vue-hooks-plus/blob/master/packages/hooks/src/useRequest/docs/basic/demo
58
---
69

710
# useRequest 基础用法

packages/hooks/src/useRequest/docs/cache/index.en-US.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
map:
33
# 映射到docs的路径
44
path: /useRequest/cache/
5+
source:
6+
path: https://github.com/InhiblabCore/vue-hooks-plus/blob/master/packages/hooks/src/useRequest/plugins/useCachePlugin.ts
7+
demoPath: https://github.com/InhiblabCore/vue-hooks-plus/blob/master/packages/hooks/src/useRequest/docs/cache/demo
58
---
69

710
# Cache & SWR

0 commit comments

Comments
 (0)