Browse Source

[Fix][UI] Fix workflow name overlaps bug (#11862)

3.2.0-release
Devosend 2 years ago committed by GitHub
parent
commit
24957b5592
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      dolphinscheduler-ui/src/common/column-width-config.ts
  2. 41
      dolphinscheduler-ui/src/views/projects/workflow/definition/use-table.ts

3
dolphinscheduler-ui/src/common/column-width-config.ts

@ -94,6 +94,9 @@ export const COLUMN_WIDTH_CONFIG = {
}, },
tag: { tag: {
width: 160 width: 160
},
copy: {
width: 50
} }
} }

41
dolphinscheduler-ui/src/views/projects/workflow/definition/use-table.ts

@ -83,7 +83,8 @@ export function useTable() {
title: t('project.workflow.workflow_name'), title: t('project.workflow.workflow_name'),
key: 'name', key: 'name',
className: 'workflow-name', className: 'workflow-name',
width: 200, ...COLUMN_WIDTH_CONFIG['name'],
titleColSpan: 2,
render: (row) => render: (row) =>
h( h(
NSpace, NSpace,
@ -93,7 +94,7 @@ export function useTable() {
class: styles['workflow-name'] class: styles['workflow-name']
}, },
{ {
default: () => [ default: () =>
h( h(
ButtonLink, ButtonLink,
{ {
@ -104,24 +105,34 @@ export function useTable() {
}) })
}, },
{ {
default: () => h(NEllipsis, null, () => row.name) default: () =>
h(
NEllipsis,
COLUMN_WIDTH_CONFIG['linkEllipsis'],
() => row.name
)
} }
),
h(
NButton,
{
quaternary: true,
circle: true,
type: 'info',
size: 'tiny',
onClick: () => void copy(row.name)
},
{ icon: () => h(NIcon, { size: 16 }, () => h(CopyOutlined)) }
) )
]
} }
) )
}, },
{
title: 'Copy',
key: 'copy',
...COLUMN_WIDTH_CONFIG['copy'],
render: (row) =>
h(
NButton,
{
quaternary: true,
circle: true,
type: 'info',
size: 'tiny',
onClick: () => void copy(row.name)
},
{ icon: () => h(NIcon, { size: 16 }, () => h(CopyOutlined)) }
)
},
{ {
title: t('project.workflow.status'), title: t('project.workflow.status'),
key: 'releaseState', key: 'releaseState',

Loading…
Cancel
Save