Skip to content

Commit

Permalink
docs: treeSelect文档补足(修改的注释,非README.md文件) (#677)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrXiangXvFan authored Aug 20, 2024
1 parent 4b0d153 commit 4c35c25
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion packages/vantui/types/tree-select.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { FunctionComponent, TouchEvent, ReactNode } from 'react'
import { ViewProps } from '@tarojs/components'
export interface TreeSelectProps extends ViewProps {
/**
* @description 分类显示所需的数据
* @default []
*/
items?: {
text: number | string
badge?: number | string
Expand All @@ -12,12 +16,34 @@ export interface TreeSelectProps extends ViewProps {
disabled?: boolean
}[]
}[]
/**
* @description 右侧选中项的 id,支持传入数组
* @default -
*/
activeId?: string | number | number[] | string[]
/**
* @description 左侧选中项的索引
* @default 0
*/
mainActiveIndex?: number
value?: number
/**
* @description 高度,默认单位为px
* @default 300
*/
height?: number | string
/**
* @description 右侧项最大选中个数
* @default Infinity
*/
max?: number
/**
* @description 自定义右侧栏选中状态的图标
* @default success
*/
selectedIcon?: string
/**
* @description 点击右侧选择项时触发
*/
onClickItem?: (
event: TouchEvent & {
detail: {
Expand All @@ -27,7 +53,13 @@ export interface TreeSelectProps extends ViewProps {
}
},
) => void
/**
* @description 点击左侧导航时触发
*/
onClickNav?: (event: { detail: { index: number } }) => void
/**
* @description 自定义右侧的显示内容
*/
renderContent?: ReactNode
}
declare const TreeSelect: FunctionComponent<TreeSelectProps>
Expand Down

0 comments on commit 4c35c25

Please sign in to comment.