From fbfaca3dbd9fd1797382caede15586700f557a24 Mon Sep 17 00:00:00 2001 From: songjianet <1778651752@qq.com> Date: Tue, 26 Jul 2022 10:07:00 +0800 Subject: [PATCH] [Refactor][UI] Refactor resource manage using NSpace component. (#11098) * [Refactor][UI] Refactor resource manage using NSpace component. * [Refactor][UI] Refactor resource manage using NSpace component. --- .../resource/udf/resource/index.module.scss | 66 ++++--------- .../src/views/resource/udf/resource/index.tsx | 93 +++++++++---------- 2 files changed, 63 insertions(+), 96 deletions(-) diff --git a/dolphinscheduler-ui/src/views/resource/udf/resource/index.module.scss b/dolphinscheduler-ui/src/views/resource/udf/resource/index.module.scss index a786d64488..f717654df8 100644 --- a/dolphinscheduler-ui/src/views/resource/udf/resource/index.module.scss +++ b/dolphinscheduler-ui/src/views/resource/udf/resource/index.module.scss @@ -15,59 +15,29 @@ * limitations under the License. */ -.content { - width: 100%; - - .card { - margin-bottom: 8px; - } - - .header { - display: flex; - justify-content: space-between; - align-items: center; - margin: 10px 0; - .right { - > .search { - .list { - float: right; - margin: 3px 0 3px 4px; +.table { + table { + width: 100%; + tr { + height: 40px; + font-size: 12px; + th, + td { + &:nth-child(1) { + width: 50px; + text-align: center; } } - } - } - - .table { - table { - width: 100%; - tr { - height: 40px; - font-size: 12px; - th, - td { - &:nth-child(1) { - width: 50px; - text-align: center; - } + th { + &:nth-child(1) { + width: 60px; + text-align: center; } - th { - &:nth-child(1) { - width: 60px; - text-align: center; - } - > span { - font-size: 12px; - color: #555; - } + > span { + font-size: 12px; + color: #555; } } } } - - .pagination { - display: flex; - justify-content: center; - align-items: center; - margin-top: 20px; - } } diff --git a/dolphinscheduler-ui/src/views/resource/udf/resource/index.tsx b/dolphinscheduler-ui/src/views/resource/udf/resource/index.tsx index c888a826d7..8102fea2c7 100644 --- a/dolphinscheduler-ui/src/views/resource/udf/resource/index.tsx +++ b/dolphinscheduler-ui/src/views/resource/udf/resource/index.tsx @@ -27,11 +27,11 @@ import { NBreadcrumbItem } from 'naive-ui' import { useI18n } from 'vue-i18n' +import { useTable } from './use-table' import { SearchOutlined } from '@vicons/antd' import Card from '@/components/card' import FolderModal from './components/folder-modal' import UploadModal from './components/upload-modal' -import { useTable } from './use-table' import styles from './index.module.scss' export default defineComponent({ @@ -115,12 +115,13 @@ export default defineComponent({ const { loadingRef } = this return ( -
- -
+ + + @@ -128,6 +129,7 @@ export default defineComponent({ -
-
-
- - - - - -
-
- -
-
-
-
+ + + + + + + + +
{{ + header: () => ( + + + this.goUdfManage()}> + {t('resource.udf.udf_resources')} + + + {this.breadList.map((item, index) => ( + + this.handleBread(index)} + > + {item} + + + ))} + + ), default: () => ( -
+ -
+ -
-
- ), - header: () => ( - - - this.goUdfManage()}> - {t('resource.udf.udf_resources')} - - - {this.breadList.map((item, index) => ( - - this.handleBread(index)} - > - {item} - - - ))} - + + ) }}
@@ -214,7 +211,7 @@ export default defineComponent({ v-model:show={this.uploadShowRef} onUpdateList={this.handleUpdateList} /> -
+ ) } })