Skip to content

Commit 391796f

Browse files
authored
feat: 修复列表树搜索后无法收起展开问题(#807) (#913)
1 parent 8c7c81a commit 391796f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/pages/list/tree/index.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ const filterText = ref();
3535
const expanded = ['0', '0-0', '0-1', '0-2', '0-3', '0-4'];
3636
3737
const onInput = () => {
38+
if (!filterText.value) {
39+
filterByText.value = null;
40+
return;
41+
}
3842
filterByText.value = (node: TreeNodeModel) => {
3943
return node.label.includes(filterText.value);
4044
};

0 commit comments

Comments
 (0)