docs: add props types to document (#9550)

This commit is contained in:
neverland 2021-09-23 16:33:20 +08:00 committed by GitHub
parent 4f64457aa0
commit 03988a0d32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
42 changed files with 72 additions and 26 deletions

View File

@ -133,6 +133,7 @@ The component exports the following type definitions:
```ts
import type {
AddressEditInfo,
AddressEditProps,
AddressEditInstance,
AddressEditSearchItem,
} from 'vant';

View File

@ -133,6 +133,7 @@ export default {
```ts
import type {
AddressEditInfo,
AddressEditProps,
AddressEditInstance,
AddressEditSearchItem,
} from 'vant';

View File

@ -169,7 +169,7 @@ Use [ref](https://v3.vuejs.org/guide/component-template-refs.html) to get Area i
The component exports the following type definitions:
```ts
import type { AreaList, AreaInstance, AreaColumnOption } from 'vant';
import type { AreaProps, AreaList, AreaInstance, AreaColumnOption } from 'vant';
```
`AreaInstance` is the type of component instance:

View File

@ -171,7 +171,7 @@ confirm 事件返回的数据整体为一个数组,数组每一项对应一列
组件导出以下类型定义:
```ts
import type { AreaList, AreaInstance, AreaColumnOption } from 'vant';
import type { AreaProps, AreaList, AreaInstance, AreaColumnOption } from 'vant';
```
`AreaInstance` 是组件实例的类型,用法如下:

View File

@ -354,6 +354,7 @@ The component exports the following type definitions:
```ts
import type {
CalendarType,
CalendarProps,
CalendarDayItem,
CalendarDayType,
CalendarInstance,

View File

@ -360,6 +360,7 @@ export default {
```ts
import type {
CalendarType,
CalendarProps,
CalendarDayItem,
CalendarDayType,
CalendarInstance,

View File

@ -333,7 +333,9 @@ The component exports the following type definitions:
```ts
import type {
CheckboxProps,
CheckboxInstance,
CheckboxGroupProps,
CheckboxGroupInstance,
CheckboxGroupToggleAllOptions,
} from 'vant';

View File

@ -351,7 +351,9 @@ checkboxGroup.toggleAll({
```ts
import type {
CheckboxProps,
CheckboxInstance,
CheckboxGroupProps,
CheckboxGroupInstance,
CheckboxGroupToggleAllOptions,
} from 'vant';

View File

@ -155,7 +155,7 @@ Use [ref](https://v3.vuejs.org/guide/component-template-refs.html) to get Collap
The component exports the following type definitions:
```ts
import type { CollapseItemInstance } from 'vant';
import type { CollapseItemProps, CollapseItemInstance } from 'vant';
```
`CollapseItemInstance` is the type of component instance:

View File

@ -153,7 +153,7 @@ export default {
组件导出以下类型定义:
```ts
import type { CollapseItemInstance } from 'vant';
import type { CollapseItemProps, CollapseItemInstance } from 'vant';
```
`CollapseItemInstance` 是组件实例的类型,用法如下:

View File

@ -186,7 +186,11 @@ Use [ref](https://v3.vuejs.org/guide/component-template-refs.html) to get CountD
The component exports the following type definitions:
```ts
import type { CountDownInstance, CountDownCurrentTime } from 'vant';
import type {
CountDownProps,
CountDownInstance,
CountDownCurrentTime,
} from 'vant';
```
`CountDownInstance` is the type of component instance:

View File

@ -196,7 +196,11 @@ export default {
组件导出以下类型定义:
```ts
import type { CountDownInstance, CountDownCurrentTime } from 'vant';
import type {
CountDownProps,
CountDownInstance,
CountDownCurrentTime,
} from 'vant';
```
`CountDownInstance` 是组件实例的类型,用法如下:

View File

@ -348,7 +348,11 @@ Use [ref](https://v3.vuejs.org/guide/component-template-refs.html) to get Dateti
The component exports the following type definitions:
```ts
import type { DatetimePickerType, DatetimePickerInstance } from 'vant';
import type {
DatetimePickerType,
DatetimePickerProps,
DatetimePickerInstance,
} from 'vant';
```
`DatetimePickerInstance` is the type of component instance:

View File

@ -357,7 +357,11 @@ export default {
组件导出以下类型定义:
```ts
import type { DatetimePickerType, DatetimePickerInstance } from 'vant';
import type {
DatetimePickerType,
DatetimePickerProps,
DatetimePickerInstance,
} from 'vant';
```
`DatetimePickerInstance` 是组件实例的类型,用法如下:

View File

@ -197,6 +197,8 @@ The component exports the following type definitions:
```ts
import type {
DropdownMenuProps,
DropdownItemProps,
DropdownItemOption,
DropdownItemInstance,
DropdownMenuDirection,

View File

@ -201,6 +201,8 @@ export default {
```ts
import type {
DropdownMenuProps,
DropdownItemProps,
DropdownItemOption,
DropdownItemInstance,
DropdownMenuDirection,

View File

@ -315,6 +315,7 @@ The component exports the following type definitions:
import type {
FieldType,
FieldRule,
FieldProps,
FieldInstance,
FieldTextAlign,
FieldClearTrigger,

View File

@ -334,6 +334,7 @@ export default {
import type {
FieldType,
FieldRule,
FieldProps,
FieldInstance,
FieldTextAlign,
FieldClearTrigger,

View File

@ -547,7 +547,7 @@ Use [ref](https://v3.vuejs.org/guide/component-template-refs.html) to get Form i
The component exports the following type definitions:
```ts
import type { FormInstance } from 'vant';
import type { FormProps, FormInstance } from 'vant';
```
`FormInstance` is the type of component instance:

View File

@ -585,7 +585,7 @@ export default {
组件导出以下类型定义:
```ts
import type { FormInstance } from 'vant';
import type { FormProps, FormInstance } from 'vant';
```
`FormInstance` 是组件实例的类型,用法如下:

View File

@ -191,6 +191,7 @@ The component exports the following type definitions:
```ts
import type {
ImagePreviewProps,
ImagePreviewOptions,
ImagePreviewInstance,
ImagePreviewScaleEventParams,

View File

@ -241,6 +241,7 @@ export default {
```ts
import type {
ImagePreviewProps,
ImagePreviewOptions,
ImagePreviewInstance,
ImagePreviewScaleEventParams,

View File

@ -104,7 +104,7 @@ Use [ref](https://v3.vuejs.org/guide/component-template-refs.html) to get IndexB
The component exports the following type definitions:
```ts
import type { IndexBarInstance } from 'vant';
import type { IndexBarProps, IndexBarInstance } from 'vant';
```
`IndexBarInstance` is the type of component instance:

View File

@ -108,7 +108,7 @@ export default {
组件导出以下类型定义:
```ts
import type { IndexBarInstance } from 'vant';
import type { IndexBarProps, IndexBarInstance } from 'vant';
```
`IndexBarInstance` 是组件实例的类型,用法如下:

View File

@ -196,7 +196,7 @@ Use [ref](https://v3.vuejs.org/guide/component-template-refs.html) to get List i
The component exports the following type definitions:
```ts
import type { ListInstance, ListDirection } from 'vant';
import type { ListProps, ListInstance, ListDirection } from 'vant';
```
`ListInstance` is the type of component instance:

View File

@ -211,7 +211,7 @@ export default {
组件导出以下类型定义:
```ts
import type { ListInstance, ListDirection } from 'vant';
import type { ListProps, ListInstance, ListDirection } from 'vant';
```
`ListInstance` 是组件实例的类型,用法如下:

View File

@ -120,7 +120,7 @@ Use [ref](https://v3.vuejs.org/guide/component-template-refs.html) to get Notice
The component exports the following type definitions:
```ts
import type { NoticeBarMode, NoticeBarInstance } from 'vant';
import type { NoticeBarMode, NoticeBarProps, NoticeBarInstance } from 'vant';
```
`NoticeBarInstance` is the type of component instance:

View File

@ -141,7 +141,7 @@ app.use(NoticeBar);
组件导出以下类型定义:
```ts
import type { NoticeBarMode, NoticeBarInstance } from 'vant';
import type { NoticeBarMode, NoticeBarProps, NoticeBarInstance } from 'vant';
```
`NoticeBarInstance` 是组件实例的类型,用法如下:

View File

@ -385,6 +385,7 @@ The component exports the following type definitions:
```ts
import type {
PickerProps,
PickerColumn,
PickerOption,
PickerInstance,

View File

@ -410,6 +410,7 @@ export default {
```ts
import type {
PickerProps,
PickerColumn,
PickerOption,
PickerInstance,

View File

@ -74,7 +74,7 @@ Use `pivot-text` to custom textuse `color` to custom bar color.
The component exports the following type definitions:
```ts
import type { ProgressInstance } from 'vant';
import type { ProgressProps, ProgressInstance } from 'vant';
```
`ProgressInstance` is the type of component instance:

View File

@ -78,7 +78,7 @@ app.use(Progress);
组件导出以下类型定义:
```ts
import type { ProgressInstance } from 'vant';
import type { ProgressProps, ProgressInstance } from 'vant';
```
`ProgressInstance` 是组件实例的类型,用法如下:

View File

@ -166,7 +166,7 @@ Use [ref](https://v3.vuejs.org/guide/component-template-refs.html) to get Search
The component exports the following type definitions:
```ts
import type { SearchShape, SearchInstance } from 'vant';
import type { SearchProps, SearchShape, SearchInstance } from 'vant';
```
`SearchInstance` is the type of component instance:

View File

@ -178,7 +178,7 @@ export default {
组件导出以下类型定义:
```ts
import type { SearchShape, SearchInstance } from 'vant';
import type { SearchProps, SearchShape, SearchInstance } from 'vant';
```
`SearchInstance` 是组件实例的类型,用法如下:

View File

@ -151,7 +151,12 @@ Use [ref](https://v3.vuejs.org/guide/component-template-refs.html) to get SwipeC
The component exports the following type definitions:
```ts
import type { SwipeCellSide, SwipeCellPosition, SwipeCellInstance } from 'vant';
import type {
SwipeCellSide,
SwipeCellProps,
SwipeCellPosition,
SwipeCellInstance,
} from 'vant';
```
`SwipeCellInstance` is the type of component instance:

View File

@ -160,7 +160,12 @@ beforeClose 的第一个参数为对象,对象中包含以下属性:
组件导出以下类型定义:
```ts
import type { SwipeCellSide, SwipeCellPosition, SwipeCellInstance } from 'vant';
import type {
SwipeCellSide,
SwipeCellProps,
SwipeCellPosition,
SwipeCellInstance,
} from 'vant';
```
`SwipeCellInstance` 是组件实例的类型,用法如下:

View File

@ -184,7 +184,7 @@ Use [ref](https://v3.vuejs.org/guide/component-template-refs.html) to get Swipe
The component exports the following type definitions:
```ts
import type { SwipeInstance, SwipeToOptions } from 'vant';
import type { SwipeProps, SwipeInstance, SwipeToOptions } from 'vant';
```
`SwipeInstance` is the type of component instance:

View File

@ -192,7 +192,7 @@ export default {
组件导出以下类型定义:
```ts
import type { SwipeInstance, SwipeToOptions } from 'vant';
import type { SwipeProps, SwipeInstance, SwipeToOptions } from 'vant';
```
`SwipeInstance` 是组件实例的类型,用法如下:

View File

@ -286,7 +286,7 @@ Use [ref](https://v3.vuejs.org/guide/component-template-refs.html) to get Tabs i
The component exports the following type definitions:
```ts
import type { TabsType, TabsInstance } from 'vant';
import type { TabsType, TabsProps, TabsInstance } from 'vant';
```
`TabsInstance` is the type of component instance:

View File

@ -299,7 +299,7 @@ export default {
组件导出以下类型定义:
```ts
import type { TabsType, TabsInstance } from 'vant';
import type { TabsType, TabsProps, TabsInstance } from 'vant';
```
`TabsInstance` 是组件实例的类型,用法如下:

View File

@ -363,6 +363,7 @@ The component exports the following type definitions:
```ts
import type {
UploaderProps,
UploaderInstance,
UploaderResultType,
UploaderFileListItem,

View File

@ -388,6 +388,7 @@ before-read、after-read、before-delete 执行时会传递以下回调参数:
```ts
import type {
UploaderProps,
UploaderInstance,
UploaderResultType,
UploaderFileListItem,