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
Tree选中项 #1709
Comments
let sel = [];
function findPath(selected, children, parent = { root: true }) {
for (var i = 0; i < children.length; i++) {
const item = children[i];
if (selected === item.key) {
sel.push(item);
return;
}
if (item.children) {
findPath(selected, item.children, item);
if (sel.length) {
sel.push(item);
return;
}
}
}
} |
问题解决了吗?先关闭 |
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Tree获取选中项时,能否把选中项的父节点以及父节点的父节点全部获取,比如三级菜单,最后一级叶子节点选中后,获取选中项前面2项获取不到
The text was updated successfully, but these errors were encountered: