-
Notifications
You must be signed in to change notification settings - Fork 141
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
[comp:tree] api #446
Labels
Comments
Translation of this issue:[COMP: TREE] API
What problem does this feature solve?What does the proposed API look like?IxTreeTreeProps
TreeNode
TreeCheckable
TreeDraggable
TreeExpandable
TreeSelectable
TreeSlots
TreeMethods
|
This was referenced Oct 11, 2021
Closed
danranVm
added a commit
that referenced
this issue
Oct 14, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What problem does this feature solve?
What does the proposed API look like?
IxTree
TreeProps
v-model:checkedKeys
key
数组(string | number)[]
v-model:expandedRowKeys
key
数组(string | number)[]
v-model:selectedRowKeys
key
数组(string | number)[]
block
boolean
false
checkable
TreeCheckable
childrenKey
key
string
children
dataSource
object[]
draggable
TreeDraggable
droppable
TreeDroppable
empty
string | EmptyProps | #empty
expandable
TreeExpandable
height
number
nodeKey
key
的取值string | record => string | number
key
selectable
TreeSelectable
showLine
boolean
false
useVirtual
boolean
false
height
onNodeClick
(evt: Event, node: TreeNode) => void
onNodeContextmenu
(evt: Event, node: TreeNode) => void
TreeNode
additional
object
class
,style
或者其他属性children
TreeNode[]
disabled
boolean | { checkable: boolean, expandable: boolean, draggable: boolean, droppable: boolean}
true
时,优先级高于TreeProps
isLeaf
boolean
false
时会强制将其作为父节点,配合loadChildren
使用key
string | number
TreeProps
中的nodeKey
设置唯一值label
string
prefix
string
suffix
string
TreeCheckable
disabled
(node: TreeNode) => boolean
onChange
(checkedKeys: (string | number)[], checkedNodes: TreeNode[]) => void
onCheck
(checked: boolean, node: TreeNode) => void
TreeDraggable
disabled
(node: TreeNode) => boolean
onDragStart
dragstart
触发时调用(evt: DragEvent, node: TreeNode) => void
onDragEnd
dragend
触发时调用(evt: DragEvent, node: TreeNode) => void
onDragEnter
dragenter
触发时调用(evt: DragEvent, node: TreeNode) => void
onDragLeave
dragleave
触发时调用(evt: DragEvent, node: TreeNode) => void
onDragOver
dragover
触发时调用(evt: DragEvent, node: TreeNode) => void
TreeDroppable
disabled
(options: TreeDropOptions) => boolean
onDrop
drop
触发时调用(evt: DragEvent, options: TreeDropOptions) => void
TreeExpandable
disabled
(node: TreeNode) => boolean
icon
string
right
loadChildren
(node: TreeNode) => Promise<TreeNode[]>
loadedKeys
key
(string | number)[]
onChange
(expendedKeys: (string | number)[], expendedNodes: TreeNode[]) => void
onExpand
(expanded: boolean, node: TreeNode) => void
onLoaded
(node: TreeNode, loadedKeys: (string | number)[]) => void
TreeSelectable
disabled
(node: TreeNode) => boolean
multiple
boolean
true
onChange
(selectedKeys: (string | number)[], selectedNodes: TreeNode[]) => void
onSelect
(selected: boolean, node: TreeNode) => void
TreeSlots
expandIcon
{key: string | number, expanded: boolean, node: TreeNode}
label
{node: TreeNode}
prefix
{key: string | number, checked: boolean, expanded: boolean, selected: boolean, node: TreeNode}
suffix
{key: string | number, checked: boolean, expanded: boolean, selected: boolean, node: TreeNode}
TreeMethods
scrollTo
(value?: number | ScrollToConfig) => void
The text was updated successfully, but these errors were encountered: