From 163df5f1a3acccea6f6cd68e2921a892b6dc8935 Mon Sep 17 00:00:00 2001 From: songjianet <1778651752@qq.com> Date: Sun, 31 Jul 2022 14:54:18 +0800 Subject: [PATCH] [Refactor][UI] Refactor task group option using NSpace component. (#11209) --- .../task-group/option/index.module.scss | 55 ------------------- .../resource/task-group/option/index.tsx | 52 ++++++++---------- 2 files changed, 23 insertions(+), 84 deletions(-) delete mode 100644 dolphinscheduler-ui/src/views/resource/task-group/option/index.module.scss diff --git a/dolphinscheduler-ui/src/views/resource/task-group/option/index.module.scss b/dolphinscheduler-ui/src/views/resource/task-group/option/index.module.scss deleted file mode 100644 index 3985f529a9..0000000000 --- a/dolphinscheduler-ui/src/views/resource/task-group/option/index.module.scss +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -.toolbar { - display: flex; - justify-content: space-between; - align-items: center; - padding: 0 0 0 0; - .left { - align-items: center; - } - .right { - display: flex; - justify-content: space-between; - align-items: center; - button { - margin-left: 10px; - } - } -} - -.table-card { - margin-top: 2px; - - .table-action { - display: flex; - justify-content: center; - align-items: center; - button { - margin: 0 2px 0 0; - } - div { - margin: 0 2px 0 0; - } - } - .pagination { - margin-top: 20px; - display: flex; - justify-content: center; - } -} diff --git a/dolphinscheduler-ui/src/views/resource/task-group/option/index.tsx b/dolphinscheduler-ui/src/views/resource/task-group/option/index.tsx index 2950c433c3..6cd4cf06e2 100644 --- a/dolphinscheduler-ui/src/views/resource/task-group/option/index.tsx +++ b/dolphinscheduler-ui/src/views/resource/task-group/option/index.tsx @@ -20,14 +20,13 @@ import { NButton, NIcon, NInput, - NCard, NDataTable, - NPagination + NPagination, + NSpace } from 'naive-ui' import Card from '@/components/card' import { SearchOutlined } from '@vicons/antd' import { useI18n } from 'vue-i18n' -import styles from './index.module.scss' import { useTable } from './use-table' import FormModal from './components/form-modal' @@ -146,21 +145,19 @@ const taskGroupOption = defineComponent({ const { columns } = useTable(updateItem, resetTableData) return ( -
- -
-
- this.onCreate()} - > - {t('resource.task_group_option.create')} - -
-
+ + + + this.onCreate()} + > + {t('resource.task_group_option.create')} + + -
-
-
- -
+ + + + + -
+ -
-
+ +
{showModalRef && ( )} -
+ ) } })