Browse Source

refactor: tree component empty state display (#853)

pull/860/head
zhangfugui 5 years ago
committed by GitHub
parent
commit
186b274faa
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/components/Tree/src/Tree.vue

4
src/components/Tree/src/Tree.vue

@ -105,7 +105,7 @@
);
const getNotFound = computed((): boolean => {
return searchState.startSearch && searchState.searchData?.length === 0;
return !getTreeData.value || getTreeData.value.length === 0;
});
const {
@ -381,7 +381,7 @@
</Tree>
</ScrollContainer>
<Empty v-show={unref(getNotFound)} class="!mt-4" />
<Empty v-show={unref(getNotFound)} image={Empty.PRESENTED_IMAGE_SIMPLE} class="!mt-4" />
</div>
);
};

Loading…
Cancel
Save