如何知道 TreeView 节点何时关闭(未展开)
How to know when a TreeView Node is closed ( not Expanded)
我在文档 TreeView doc 中发现您可以使用 onExpanded
来知道 TreeView
中的 Node
何时是 expanded
但您如何才能知道知道什么时候 Node
是 closed
吗?
代码示例:
TreeView {
TableViewColumn {
title: "Name"
role: "fileName"
width: 300
}
TableViewColumn {
title: "Permissions"
role: "filePermissions"
width: 100
}
model: fileSystemModel
onExpanded {
console.log("expanded :" + index)
}
}
从the documentation开始,onCollapsed
与onExpanded
相反,因此您可以检查该信号何时发出。
我在文档 TreeView doc 中发现您可以使用 onExpanded
来知道 TreeView
中的 Node
何时是 expanded
但您如何才能知道知道什么时候 Node
是 closed
吗?
代码示例:
TreeView {
TableViewColumn {
title: "Name"
role: "fileName"
width: 300
}
TableViewColumn {
title: "Permissions"
role: "filePermissions"
width: 100
}
model: fileSystemModel
onExpanded {
console.log("expanded :" + index)
}
}
从the documentation开始,onCollapsed
与onExpanded
相反,因此您可以检查该信号何时发出。