mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
docs: add props types to document (#9550)
This commit is contained in:
parent
4f64457aa0
commit
03988a0d32
@ -133,6 +133,7 @@ The component exports the following type definitions:
|
||||
```ts
|
||||
import type {
|
||||
AddressEditInfo,
|
||||
AddressEditProps,
|
||||
AddressEditInstance,
|
||||
AddressEditSearchItem,
|
||||
} from 'vant';
|
||||
|
@ -133,6 +133,7 @@ export default {
|
||||
```ts
|
||||
import type {
|
||||
AddressEditInfo,
|
||||
AddressEditProps,
|
||||
AddressEditInstance,
|
||||
AddressEditSearchItem,
|
||||
} from 'vant';
|
||||
|
@ -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:
|
||||
|
@ -171,7 +171,7 @@ confirm 事件返回的数据整体为一个数组,数组每一项对应一列
|
||||
组件导出以下类型定义:
|
||||
|
||||
```ts
|
||||
import type { AreaList, AreaInstance, AreaColumnOption } from 'vant';
|
||||
import type { AreaProps, AreaList, AreaInstance, AreaColumnOption } from 'vant';
|
||||
```
|
||||
|
||||
`AreaInstance` 是组件实例的类型,用法如下:
|
||||
|
@ -354,6 +354,7 @@ The component exports the following type definitions:
|
||||
```ts
|
||||
import type {
|
||||
CalendarType,
|
||||
CalendarProps,
|
||||
CalendarDayItem,
|
||||
CalendarDayType,
|
||||
CalendarInstance,
|
||||
|
@ -360,6 +360,7 @@ export default {
|
||||
```ts
|
||||
import type {
|
||||
CalendarType,
|
||||
CalendarProps,
|
||||
CalendarDayItem,
|
||||
CalendarDayType,
|
||||
CalendarInstance,
|
||||
|
@ -333,7 +333,9 @@ The component exports the following type definitions:
|
||||
|
||||
```ts
|
||||
import type {
|
||||
CheckboxProps,
|
||||
CheckboxInstance,
|
||||
CheckboxGroupProps,
|
||||
CheckboxGroupInstance,
|
||||
CheckboxGroupToggleAllOptions,
|
||||
} from 'vant';
|
||||
|
@ -351,7 +351,9 @@ checkboxGroup.toggleAll({
|
||||
|
||||
```ts
|
||||
import type {
|
||||
CheckboxProps,
|
||||
CheckboxInstance,
|
||||
CheckboxGroupProps,
|
||||
CheckboxGroupInstance,
|
||||
CheckboxGroupToggleAllOptions,
|
||||
} from 'vant';
|
||||
|
@ -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:
|
||||
|
@ -153,7 +153,7 @@ export default {
|
||||
组件导出以下类型定义:
|
||||
|
||||
```ts
|
||||
import type { CollapseItemInstance } from 'vant';
|
||||
import type { CollapseItemProps, CollapseItemInstance } from 'vant';
|
||||
```
|
||||
|
||||
`CollapseItemInstance` 是组件实例的类型,用法如下:
|
||||
|
@ -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:
|
||||
|
@ -196,7 +196,11 @@ export default {
|
||||
组件导出以下类型定义:
|
||||
|
||||
```ts
|
||||
import type { CountDownInstance, CountDownCurrentTime } from 'vant';
|
||||
import type {
|
||||
CountDownProps,
|
||||
CountDownInstance,
|
||||
CountDownCurrentTime,
|
||||
} from 'vant';
|
||||
```
|
||||
|
||||
`CountDownInstance` 是组件实例的类型,用法如下:
|
||||
|
@ -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:
|
||||
|
@ -357,7 +357,11 @@ export default {
|
||||
组件导出以下类型定义:
|
||||
|
||||
```ts
|
||||
import type { DatetimePickerType, DatetimePickerInstance } from 'vant';
|
||||
import type {
|
||||
DatetimePickerType,
|
||||
DatetimePickerProps,
|
||||
DatetimePickerInstance,
|
||||
} from 'vant';
|
||||
```
|
||||
|
||||
`DatetimePickerInstance` 是组件实例的类型,用法如下:
|
||||
|
@ -197,6 +197,8 @@ The component exports the following type definitions:
|
||||
|
||||
```ts
|
||||
import type {
|
||||
DropdownMenuProps,
|
||||
DropdownItemProps,
|
||||
DropdownItemOption,
|
||||
DropdownItemInstance,
|
||||
DropdownMenuDirection,
|
||||
|
@ -201,6 +201,8 @@ export default {
|
||||
|
||||
```ts
|
||||
import type {
|
||||
DropdownMenuProps,
|
||||
DropdownItemProps,
|
||||
DropdownItemOption,
|
||||
DropdownItemInstance,
|
||||
DropdownMenuDirection,
|
||||
|
@ -315,6 +315,7 @@ The component exports the following type definitions:
|
||||
import type {
|
||||
FieldType,
|
||||
FieldRule,
|
||||
FieldProps,
|
||||
FieldInstance,
|
||||
FieldTextAlign,
|
||||
FieldClearTrigger,
|
||||
|
@ -334,6 +334,7 @@ export default {
|
||||
import type {
|
||||
FieldType,
|
||||
FieldRule,
|
||||
FieldProps,
|
||||
FieldInstance,
|
||||
FieldTextAlign,
|
||||
FieldClearTrigger,
|
||||
|
@ -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:
|
||||
|
@ -585,7 +585,7 @@ export default {
|
||||
组件导出以下类型定义:
|
||||
|
||||
```ts
|
||||
import type { FormInstance } from 'vant';
|
||||
import type { FormProps, FormInstance } from 'vant';
|
||||
```
|
||||
|
||||
`FormInstance` 是组件实例的类型,用法如下:
|
||||
|
@ -191,6 +191,7 @@ The component exports the following type definitions:
|
||||
|
||||
```ts
|
||||
import type {
|
||||
ImagePreviewProps,
|
||||
ImagePreviewOptions,
|
||||
ImagePreviewInstance,
|
||||
ImagePreviewScaleEventParams,
|
||||
|
@ -241,6 +241,7 @@ export default {
|
||||
|
||||
```ts
|
||||
import type {
|
||||
ImagePreviewProps,
|
||||
ImagePreviewOptions,
|
||||
ImagePreviewInstance,
|
||||
ImagePreviewScaleEventParams,
|
||||
|
@ -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:
|
||||
|
@ -108,7 +108,7 @@ export default {
|
||||
组件导出以下类型定义:
|
||||
|
||||
```ts
|
||||
import type { IndexBarInstance } from 'vant';
|
||||
import type { IndexBarProps, IndexBarInstance } from 'vant';
|
||||
```
|
||||
|
||||
`IndexBarInstance` 是组件实例的类型,用法如下:
|
||||
|
@ -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:
|
||||
|
@ -211,7 +211,7 @@ export default {
|
||||
组件导出以下类型定义:
|
||||
|
||||
```ts
|
||||
import type { ListInstance, ListDirection } from 'vant';
|
||||
import type { ListProps, ListInstance, ListDirection } from 'vant';
|
||||
```
|
||||
|
||||
`ListInstance` 是组件实例的类型,用法如下:
|
||||
|
@ -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:
|
||||
|
@ -141,7 +141,7 @@ app.use(NoticeBar);
|
||||
组件导出以下类型定义:
|
||||
|
||||
```ts
|
||||
import type { NoticeBarMode, NoticeBarInstance } from 'vant';
|
||||
import type { NoticeBarMode, NoticeBarProps, NoticeBarInstance } from 'vant';
|
||||
```
|
||||
|
||||
`NoticeBarInstance` 是组件实例的类型,用法如下:
|
||||
|
@ -385,6 +385,7 @@ The component exports the following type definitions:
|
||||
|
||||
```ts
|
||||
import type {
|
||||
PickerProps,
|
||||
PickerColumn,
|
||||
PickerOption,
|
||||
PickerInstance,
|
||||
|
@ -410,6 +410,7 @@ export default {
|
||||
|
||||
```ts
|
||||
import type {
|
||||
PickerProps,
|
||||
PickerColumn,
|
||||
PickerOption,
|
||||
PickerInstance,
|
||||
|
@ -74,7 +74,7 @@ Use `pivot-text` to custom text,use `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:
|
||||
|
@ -78,7 +78,7 @@ app.use(Progress);
|
||||
组件导出以下类型定义:
|
||||
|
||||
```ts
|
||||
import type { ProgressInstance } from 'vant';
|
||||
import type { ProgressProps, ProgressInstance } from 'vant';
|
||||
```
|
||||
|
||||
`ProgressInstance` 是组件实例的类型,用法如下:
|
||||
|
@ -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:
|
||||
|
@ -178,7 +178,7 @@ export default {
|
||||
组件导出以下类型定义:
|
||||
|
||||
```ts
|
||||
import type { SearchShape, SearchInstance } from 'vant';
|
||||
import type { SearchProps, SearchShape, SearchInstance } from 'vant';
|
||||
```
|
||||
|
||||
`SearchInstance` 是组件实例的类型,用法如下:
|
||||
|
@ -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:
|
||||
|
@ -160,7 +160,12 @@ beforeClose 的第一个参数为对象,对象中包含以下属性:
|
||||
组件导出以下类型定义:
|
||||
|
||||
```ts
|
||||
import type { SwipeCellSide, SwipeCellPosition, SwipeCellInstance } from 'vant';
|
||||
import type {
|
||||
SwipeCellSide,
|
||||
SwipeCellProps,
|
||||
SwipeCellPosition,
|
||||
SwipeCellInstance,
|
||||
} from 'vant';
|
||||
```
|
||||
|
||||
`SwipeCellInstance` 是组件实例的类型,用法如下:
|
||||
|
@ -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:
|
||||
|
@ -192,7 +192,7 @@ export default {
|
||||
组件导出以下类型定义:
|
||||
|
||||
```ts
|
||||
import type { SwipeInstance, SwipeToOptions } from 'vant';
|
||||
import type { SwipeProps, SwipeInstance, SwipeToOptions } from 'vant';
|
||||
```
|
||||
|
||||
`SwipeInstance` 是组件实例的类型,用法如下:
|
||||
|
@ -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:
|
||||
|
@ -299,7 +299,7 @@ export default {
|
||||
组件导出以下类型定义:
|
||||
|
||||
```ts
|
||||
import type { TabsType, TabsInstance } from 'vant';
|
||||
import type { TabsType, TabsProps, TabsInstance } from 'vant';
|
||||
```
|
||||
|
||||
`TabsInstance` 是组件实例的类型,用法如下:
|
||||
|
@ -363,6 +363,7 @@ The component exports the following type definitions:
|
||||
|
||||
```ts
|
||||
import type {
|
||||
UploaderProps,
|
||||
UploaderInstance,
|
||||
UploaderResultType,
|
||||
UploaderFileListItem,
|
||||
|
@ -388,6 +388,7 @@ before-read、after-read、before-delete 执行时会传递以下回调参数:
|
||||
|
||||
```ts
|
||||
import type {
|
||||
UploaderProps,
|
||||
UploaderInstance,
|
||||
UploaderResultType,
|
||||
UploaderFileListItem,
|
||||
|
Loading…
x
Reference in New Issue
Block a user