From 445e830a84942e66bfa28927cc563c237b0df458 Mon Sep 17 00:00:00 2001 From: songjianet <1778651752@qq.com> Date: Thu, 21 Jul 2022 21:19:23 +0800 Subject: [PATCH] [Refactor][UI] Refactor file manage using NSpace component. (#11073) --- .../src/views/resource/file/index.module.scss | 28 ------ .../src/views/resource/file/index.tsx | 94 +++++++++---------- 2 files changed, 42 insertions(+), 80 deletions(-) diff --git a/dolphinscheduler-ui/src/views/resource/file/index.module.scss b/dolphinscheduler-ui/src/views/resource/file/index.module.scss index 80c4938dbe..7be8d13c0e 100644 --- a/dolphinscheduler-ui/src/views/resource/file/index.module.scss +++ b/dolphinscheduler-ui/src/views/resource/file/index.module.scss @@ -36,13 +36,6 @@ margin-left: 160px; } -.pagination { - display: flex; - justify-content: center; - align-items: center; - margin-top: 20px; -} - .table-box { table { width: 100%; @@ -70,27 +63,6 @@ } } -.table-card { - > div div { - flex: none !important; - } -} - .breadcrumb { padding-left: 10px; } - -.conditions-model { - display: flex; - justify-content: space-between; - align-items: center; - margin: 10px 0; - .right { - > .form-box { - .list { - float: right; - margin: 3px 0 3px 4px; - } - } - } -} diff --git a/dolphinscheduler-ui/src/views/resource/file/index.tsx b/dolphinscheduler-ui/src/views/resource/file/index.tsx index b134679554..0322fda651 100644 --- a/dolphinscheduler-ui/src/views/resource/file/index.tsx +++ b/dolphinscheduler-ui/src/views/resource/file/index.tsx @@ -30,21 +30,21 @@ import { } from 'naive-ui' import { useI18n } from 'vue-i18n' import { SearchOutlined } from '@vicons/antd' -import Card from '@/components/card' import { useTable } from './table/use-table' import { useFileState } from './use-file' -import ResourceFolderModal from './folder' -import ResourceUploadModal from './upload' -import ResourceRenameModal from './rename' import { BreadcrumbItem, IRenameFile } from './types' -import type { Router } from 'vue-router' -import styles from './index.module.scss' import { useFileStore } from '@/store/file/file' import { queryCurrentResourceById, queryResourceById } from '@/service/modules/resources' -import { ResourceFile } from '@/service/modules/resources/types' +import Card from '@/components/card' +import ResourceFolderModal from './folder' +import ResourceUploadModal from './upload' +import ResourceRenameModal from './rename' +import styles from './index.module.scss' +import type { ResourceFile } from '@/service/modules/resources/types' +import type { Router } from 'vue-router' export default defineComponent({ name: 'File', @@ -255,49 +255,39 @@ export default defineComponent({ } = this return ( -
- -
+ + + + + + {t('resource.file.create_folder')} + + + {t('resource.file.create_file')} + + + {t('resource.file.upload_files')} + + - - - {t('resource.file.create_folder')} - - - {t('resource.file.create_file')} - - - {t('resource.file.upload_files')} - - + + + + + + -
-
-
- - - - - -
-
- -
-
-
-
+
- + {{ 'header-extra': () => ( @@ -319,7 +309,7 @@ export default defineComponent({ ), default: () => ( -
+ -
+ -
-
+ + ) }}
@@ -361,7 +351,7 @@ export default defineComponent({ description={this.renameInfo.description} onUpdateList={this.updateList} /> -
+ ) } })