ListProps interface
列表组件:支持多级嵌套、图标、展开的列表
Signature
typescript
interface ListProps1
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
boolean | (Optional) Whether to show the border | ||
boolean | (Optional) Whether nested child items are allowed to expand | ||
number | (Optional) List item height (pixels) | ||
List data ( required) | |||
number | (Optional) 列表最大高度(像素)。提供时列表视口高度取 min(内容高度, 该值),用于如下拉菜单等父容器无定值高度的场景,使虚拟列表可正常滚动 | ||
(id: string, item: ListChildren) => void | (Optional) 点击列表项时触发,参数为 id 与列表项 | ||
(id: string) => void | (Optional) 右键点击列表项时触发,参数为 id | ||
(id: string) => void | (Optional) 双击列表项时触发,参数为 id |