fix(editor): 树组件搜索后不展开所有节点

This commit is contained in:
roymondchen 2025-07-02 19:47:52 +08:00
parent 727af1058d
commit c984c1a0cf

View File

@ -32,10 +32,12 @@ export const useFilter = (
const visible = filterIsMatch(text, node); const visible = filterIsMatch(text, node);
if (visible && parents.length) { if (visible && parents.length) {
parents.forEach((parent) => { parents.forEach((parent) => {
updateStatus(nodeStatusMap.value!, parent.id, { if (text || text.length) {
visible, updateStatus(nodeStatusMap.value!, parent.id, {
expand: true, visible,
}); expand: true,
});
}
}); });
} }