From 7ed1e7cd742f0e62f41329467e91e7bf1c20cfa1 Mon Sep 17 00:00:00 2001 From: songjianet <1778651752@qq.com> Date: Mon, 25 Jul 2022 22:22:04 +0800 Subject: [PATCH] [Refactor][UI] Refactor function manage using NSpace component. (#11124) --- .../resource/udf/function/index.module.scss | 66 ++++--------- .../src/views/resource/udf/function/index.tsx | 98 +++++++++---------- 2 files changed, 65 insertions(+), 99 deletions(-) diff --git a/dolphinscheduler-ui/src/views/resource/udf/function/index.module.scss b/dolphinscheduler-ui/src/views/resource/udf/function/index.module.scss index a786d64488..f717654df8 100644 --- a/dolphinscheduler-ui/src/views/resource/udf/function/index.module.scss +++ b/dolphinscheduler-ui/src/views/resource/udf/function/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/function/index.tsx b/dolphinscheduler-ui/src/views/resource/udf/function/index.tsx index 3dc843725d..878b867db8 100644 --- a/dolphinscheduler-ui/src/views/resource/udf/function/index.tsx +++ b/dolphinscheduler-ui/src/views/resource/udf/function/index.tsx @@ -26,9 +26,9 @@ import { } from 'naive-ui' import { useI18n } from 'vue-i18n' import { SearchOutlined } from '@vicons/antd' +import { useTable } from './use-table' import Card from '@/components/card' import FolderModal from './components/function-modal' -import { useTable } from './use-table' import styles from './index.module.scss' export default defineComponent({ @@ -94,68 +94,64 @@ export default defineComponent({ const { loadingRef } = this return ( -
- -
+ + + + + {t('resource.function.create_udf_function')} + - - {t('resource.function.create_udf_function')} + + + + + -
-
-
- - - - - -
-
- -
-
-
-
+
- -
- + -
+ + + +
-
+ ) } })