This is an automated email from the ASF dual-hosted git repository.
songjian pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new 48d526f275 [Fix][UI Next][V1.0.0-Beta] Fix bug where route is error in
file manage root (#9697)
48d526f275 is described below
commit 48d526f275f941d2068985b22747fd017a4d48e0
Author: Devosend <[email protected]>
AuthorDate: Sun Apr 24 15:29:50 2022 +0800
[Fix][UI Next][V1.0.0-Beta] Fix bug where route is error in file manage
root (#9697)
---
.../src/views/resource/file/index.tsx | 25 +++++++++++++++++-----
1 file changed, 20 insertions(+), 5 deletions(-)
diff --git a/dolphinscheduler-ui-next/src/views/resource/file/index.tsx
b/dolphinscheduler-ui-next/src/views/resource/file/index.tsx
index 7ab9878906..f3ec64cd2c 100644
--- a/dolphinscheduler-ui-next/src/views/resource/file/index.tsx
+++ b/dolphinscheduler-ui-next/src/views/resource/file/index.tsx
@@ -134,6 +134,12 @@ export default defineComponent({
handleShowModal(renameShowRef)
}
+ const handleGoRoot = () => {
+ router.push({
+ name: 'file-manage'
+ })
+ }
+
const updateList = () => {
resourceListRef.value = getResourceListState(
fileId.value,
@@ -226,6 +232,7 @@ export default defineComponent({
handleRenameFile,
handleUpdatePage,
handleUpdatePageSize,
+ handleGoRoot,
pagination: paginationReactive,
renameInfo,
breadcrumbItemsRef
@@ -291,11 +298,19 @@ export default defineComponent({
'header-extra': () => (
<NBreadcrumb separator='>' class={styles['breadcrumb']}>
{this.breadcrumbItemsRef?.map((item: BreadcrumbItem) => {
- return (
- <NBreadcrumbItem href={item.id.toString()}>
- {item.fullName}
- </NBreadcrumbItem>
- )
+ if (item.id === 0) {
+ return (
+ <NBreadcrumbItem>
+ <span
onClick={this.handleGoRoot}>{item.fullName}</span>
+ </NBreadcrumbItem>
+ )
+ } else {
+ return (
+ <NBreadcrumbItem href={item.id.toString()}>
+ {item.fullName}
+ </NBreadcrumbItem>
+ )
+ }
})}
</NBreadcrumb>
),