Commit 186b274faa7adc01cd419e424ecf1cda46814c89

Authored by zhangfugui
Committed by GitHub
1 parent f1c0e0c5

refactor: tree component empty state display (#853)

src/components/Tree/src/Tree.vue
... ... @@ -105,7 +105,7 @@
105 105 );
106 106  
107 107 const getNotFound = computed((): boolean => {
108   - return searchState.startSearch && searchState.searchData?.length === 0;
  108 + return !getTreeData.value || getTreeData.value.length === 0;
109 109 });
110 110  
111 111 const {
... ... @@ -381,7 +381,7 @@
381 381 </Tree>
382 382 </ScrollContainer>
383 383  
384   - <Empty v-show={unref(getNotFound)} class="!mt-4" />
  384 + <Empty v-show={unref(getNotFound)} image={Empty.PRESENTED_IMAGE_SIMPLE} class="!mt-4" />
385 385 </div>
386 386 );
387 387 };
... ...