Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

treeSelect文档补足(修改的注释,非README.md文件) #677

Merged
merged 4 commits into from
Aug 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading