You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by wa...@apache.org on 2022/08/11 09:11:46 UTC

[dolphinscheduler] branch dev updated: [Refactor][UI] Refactor workflow definition version using NSpace component. (#11420)

This is an automated email from the ASF dual-hosted git repository.

wanggenhua 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 20b87ee761 [Refactor][UI] Refactor workflow definition version using NSpace component. (#11420)
20b87ee761 is described below

commit 20b87ee76178de9e55c68e3d78ed8bdb5d1509f3
Author: songjianet <17...@qq.com>
AuthorDate: Thu Aug 11 17:11:38 2022 +0800

    [Refactor][UI] Refactor workflow definition version using NSpace component. (#11420)
---
 .../workflow/definition/components/use-table.ts    |  4 +--
 .../definition/components/version-modal.tsx        | 34 +++++++++++-----------
 .../projects/workflow/definition/index.module.scss | 34 ----------------------
 3 files changed, 19 insertions(+), 53 deletions(-)

diff --git a/dolphinscheduler-ui/src/views/projects/workflow/definition/components/use-table.ts b/dolphinscheduler-ui/src/views/projects/workflow/definition/components/use-table.ts
index b0be323464..dce5ffedff 100644
--- a/dolphinscheduler-ui/src/views/projects/workflow/definition/components/use-table.ts
+++ b/dolphinscheduler-ui/src/views/projects/workflow/definition/components/use-table.ts
@@ -107,7 +107,7 @@ export function useTable(
                             {
                               circle: true,
                               type: 'info',
-                              size: 'tiny',
+                              size: 'small',
                               disabled: _row.version === variables.row.version
                             },
                             {
@@ -139,7 +139,7 @@ export function useTable(
                             {
                               circle: true,
                               type: 'error',
-                              size: 'tiny',
+                              size: 'small',
                               disabled: _row.version === variables.row.version
                             },
                             {
diff --git a/dolphinscheduler-ui/src/views/projects/workflow/definition/components/version-modal.tsx b/dolphinscheduler-ui/src/views/projects/workflow/definition/components/version-modal.tsx
index c1b19d534c..bbcf70bb7a 100644
--- a/dolphinscheduler-ui/src/views/projects/workflow/definition/components/version-modal.tsx
+++ b/dolphinscheduler-ui/src/views/projects/workflow/definition/components/version-modal.tsx
@@ -20,9 +20,8 @@ import { useI18n } from 'vue-i18n'
 import { useForm } from './use-form'
 import { useModal } from './use-modal'
 import { useTable } from './use-table'
-import { NDataTable, NPagination } from 'naive-ui'
+import { NDataTable, NPagination, NSpace } from 'naive-ui'
 import Modal from '@/components/modal'
-import styles from '../index.module.scss'
 import type { IDefinitionData } from '../types'
 
 const props = {
@@ -100,22 +99,23 @@ export default defineComponent({
         onCancel={this.hideModal}
         onConfirm={this.hideModal}
       >
-        <NDataTable
-          loading={loadingRef}
-          columns={this.columns}
-          data={this.tableData}
-          striped
-          size={'small'}
-          class={styles.table}
-        />
-        <div class={styles.pagination}>
-          <NPagination
-            v-model:page={this.page}
-            v-model:page-size={this.pageSize}
-            page-count={this.totalPage}
-            onUpdatePage={requestData}
+        <NSpace vertical>
+          <NDataTable
+            loading={loadingRef}
+            columns={this.columns}
+            data={this.tableData}
+            striped
+            size={'small'}
           />
-        </div>
+          <NSpace justify='center'>
+            <NPagination
+              v-model:page={this.page}
+              v-model:page-size={this.pageSize}
+              page-count={this.totalPage}
+              onUpdatePage={requestData}
+            />
+          </NSpace>
+        </NSpace>
       </Modal>
     )
   }
diff --git a/dolphinscheduler-ui/src/views/projects/workflow/definition/index.module.scss b/dolphinscheduler-ui/src/views/projects/workflow/definition/index.module.scss
index 251e88f29e..558b144aed 100644
--- a/dolphinscheduler-ui/src/views/projects/workflow/definition/index.module.scss
+++ b/dolphinscheduler-ui/src/views/projects/workflow/definition/index.module.scss
@@ -15,40 +15,6 @@
  * limitations under the License.
  */
 
-.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;
-        }
-        > span {
-          font-size: 12px;
-          color: #555;
-        }
-      }
-    }
-  }
-}
-
-.pagination {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  margin-top: 20px;
-}
-
 .startup {
   align-items: center;
   > div:first-child {