docs(@vant/use): adjust strcut

This commit is contained in:
chenjiahan 2020-10-04 19:46:14 +08:00
parent ca860fda5f
commit 659ccc7a81
4 changed files with 18 additions and 10 deletions

View File

@ -54,7 +54,9 @@ export default {
}; };
``` ```
## 类型定义 ## API
### 类型定义
```ts ```ts
function useClickAway( function useClickAway(
@ -68,7 +70,7 @@ type Options = {
}; };
``` ```
## 参数 ### 参数
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 |
| -------- | ------------------------ | -------------------------- | ------ | | -------- | ------------------------ | -------------------------- | ------ |
@ -76,7 +78,7 @@ type Options = {
| listener | 点击外部时触发的回调函数 | _EventListener_ | - | | listener | 点击外部时触发的回调函数 | _EventListener_ | - |
| options | 可选的配置项 | _Options_ | 见下表 | | options | 可选的配置项 | _Options_ | 见下表 |
## Options ### Options
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 |
| --------- | -------------- | -------- | ------- | | --------- | -------------- | -------- | ------- |

View File

@ -46,7 +46,9 @@ type Options = {
}; };
``` ```
## 参数 ## API
### 参数
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 |
| -------- | ------------------------ | --------------- | ------ | | -------- | ------------------------ | --------------- | ------ |
@ -54,7 +56,7 @@ type Options = {
| listener | 点击外部时触发的回调函数 | _EventListener_ | - | | listener | 点击外部时触发的回调函数 | _EventListener_ | - |
| options | 可选的配置项 | _Options_ | - | | options | 可选的配置项 | _Options_ | - |
## Options ### Options
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- | | --- | --- | --- | --- |

View File

@ -21,7 +21,9 @@ export default {
}; };
``` ```
## 类型定义 ## API
### 类型定义
```ts ```ts
function usePageVisibility(): Ref<VisibilityState>; function usePageVisibility(): Ref<VisibilityState>;
@ -29,7 +31,7 @@ function usePageVisibility(): Ref<VisibilityState>;
type VisibilityState = 'visible' | 'hidden'; type VisibilityState = 'visible' | 'hidden';
``` ```
## 返回值 ### 返回值
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- | | --- | --- | --- | --- |

View File

@ -32,19 +32,21 @@ export default {
}; };
``` ```
## 类型定义 ## API
### 类型定义
```ts ```ts
function useScrollParent(element: Ref<Element>): Ref<Element>; function useScrollParent(element: Ref<Element>): Ref<Element>;
``` ```
## 参数 ### 参数
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 |
| ------- | -------- | --------------- | ------ | | ------- | -------- | --------------- | ------ |
| element | 当前元素 | _Ref\<Element>_ | - | | element | 当前元素 | _Ref\<Element>_ | - |
## 返回值 ### 返回值
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 |
| ------------ | ------------------ | --------------- | ------ | | ------------ | ------------------ | --------------- | ------ |