mirror of
https://github.com/vbenjs/vben-admin-thin-next.git
synced 2025-02-03 10:28:41 +08:00
refactor: tree component empty state display (#853)
This commit is contained in:
parent
f1c0e0c52b
commit
186b274faa
@ -105,7 +105,7 @@
|
|||||||
);
|
);
|
||||||
|
|
||||||
const getNotFound = computed((): boolean => {
|
const getNotFound = computed((): boolean => {
|
||||||
return searchState.startSearch && searchState.searchData?.length === 0;
|
return !getTreeData.value || getTreeData.value.length === 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@ -381,7 +381,7 @@
|
|||||||
</Tree>
|
</Tree>
|
||||||
</ScrollContainer>
|
</ScrollContainer>
|
||||||
|
|
||||||
<Empty v-show={unref(getNotFound)} class="!mt-4" />
|
<Empty v-show={unref(getNotFound)} image={Empty.PRESENTED_IMAGE_SIMPLE} class="!mt-4" />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user