From 698c795d4f3412e175fb28e569bf34c6d8085f0b Mon Sep 17 00:00:00 2001 From: songjianet <1778651752@qq.com> Date: Sun, 6 Mar 2022 20:59:20 +0800 Subject: [PATCH] [Fix][UI Next][V1.0.0-Alpha] Fix the is no tooltip for timing management table editing and up and down buttons. (#8716) --- .../definition/components/table-action.tsx | 6 +- .../workflow/definition/timing/use-table.ts | 78 ++++++++++++------- 2 files changed, 56 insertions(+), 28 deletions(-) diff --git a/dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/table-action.tsx b/dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/table-action.tsx index 06cf490a48..ab503bba8f 100644 --- a/dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/table-action.tsx +++ b/dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/table-action.tsx @@ -56,7 +56,6 @@ export default defineComponent({ 'gotoWorkflowTree' ], setup(props, ctx) { - const handleEditWorkflow = () => { ctx.emit('editWorkflow') } @@ -178,7 +177,10 @@ export default defineComponent({ {{ - default: () => releaseState === 'ONLINE'? t('project.workflow.down_line'):t('project.workflow.up_line'), + default: () => + releaseState === 'ONLINE' + ? t('project.workflow.down_line') + : t('project.workflow.up_line'), trigger: () => ( [ h( - NButton, + NTooltip, + {}, { - circle: true, - type: 'info', - size: 'small', - disabled: row.releaseState === 'ONLINE', - onClick: () => { - handleEdit(row) - } - }, - { - icon: () => h(EditOutlined) + trigger: () => + h( + NButton, + { + circle: true, + type: 'info', + size: 'small', + disabled: row.releaseState === 'ONLINE', + onClick: () => { + handleEdit(row) + } + }, + { + icon: () => h(EditOutlined) + } + ), + default: () => t('project.workflow.edit') } ), h( - NButton, + NTooltip, + {}, { - circle: true, - type: row.releaseState === 'ONLINE' ? 'error' : 'warning', - size: 'small', - onClick: () => { - handleReleaseState(row) - } - }, - { - icon: () => + trigger: () => h( - row.releaseState === 'ONLINE' - ? ArrowDownOutlined - : ArrowUpOutlined - ) + NButton, + { + circle: true, + type: row.releaseState === 'ONLINE' ? 'error' : 'warning', + size: 'small', + onClick: () => { + handleReleaseState(row) + } + }, + { + icon: () => + h( + row.releaseState === 'ONLINE' + ? ArrowDownOutlined + : ArrowUpOutlined + ) + } + ), + default: () => + row.releaseState === 'ONLINE' + ? t('project.workflow.down_line') + : t('project.workflow.up_line') } ), h(