From b439468566243a350d17a3431ebc64a728d92363 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E9=80=9A=E9=80=9A?= Date: Fri, 22 Sep 2023 15:47:53 +0800 Subject: [PATCH] [improvement] improve details page return to the previous list page (#14951) improve details page return to the previous list page --- .../views/resource/components/resource/index.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dolphinscheduler-ui/src/views/resource/components/resource/index.tsx b/dolphinscheduler-ui/src/views/resource/components/resource/index.tsx index adff0a7f502b..96dcfb1ee0e1 100644 --- a/dolphinscheduler-ui/src/views/resource/components/resource/index.tsx +++ b/dolphinscheduler-ui/src/views/resource/components/resource/index.tsx @@ -106,8 +106,9 @@ export default defineComponent({ const handleRenameFile = () => { variables.renameShowRef = true } - const detailPageStore = useDetailPageStore() - const isDetailPageStore = useIsDetailPageStore() + const detailPageStore = useDetailPageStore() + const isDetailPageStore = useIsDetailPageStore() + const handleDetailBackList = () => { if(isDetailPageStore.getIsDetailPage){ variables.resourceType = detailPageStore.getResourceType @@ -116,20 +117,19 @@ export default defineComponent({ variables.searchRef = detailPageStore.getSearchValue variables.pagination.page = detailPageStore.getPage variables.pagination.pageSize = detailPageStore.getPageSize - if(isEmpty(variables.searchRef)){ + if(!isEmpty(variables.searchRef)){ handleConditions() } - detailPageStore.$reset() - isDetailPageStore.$reset() + detailPageStore.$reset() + isDetailPageStore.$reset() } else { - detailPageStore.$reset() - isDetailPageStore.$reset() + detailPageStore.$reset() + isDetailPageStore.$reset() } } onUnmounted(() => { isDetailPageStore.$reset() - detailPageStore.$reset() }) onMounted(() => { handleDetailBackList()