in seatunnel-ui/src/views/task/synchronization-definition/dag/use-model-columns.ts [218:291]
title: t('project.synchronization_definition.operation'),
key: 'operation',
...COLUMN_WIDTH_CONFIG['operation'](2),
render(row: any, index: number) {
return h(NSpace, {}, [
h(
NDropdown,
{
options: [
{
label: t('project.synchronization_definition.move_to_top'),
disabled: index === 0,
key: 'move_to_top'
},
{
label: t(
'project.synchronization_definition.move_to_bottom'
),
disabled: index === outputTableData.length - 1,
key: 'move_to_bottom'
},
{
label: t('project.synchronization_definition.move_up'),
disabled: index === 0,
key: 'move_up'
},
{
label: t('project.synchronization_definition.move_down'),
disabled: index === outputTableData.length - 1,
key: 'move_down'
}
],
onSelect(key) {
if (key === 'move_to_top') {
const records = outputTableData.splice(index, 1)
outputTableData.unshift(records[0])
} else if (key === 'move_to_bottom') {
const records = outputTableData.splice(index, 1)
outputTableData.push(records[0])
} else if (key === 'move_up') {
changeIndex(outputTableData, index, index - 1)
} else if (key === 'move_down') {
changeIndex(outputTableData, index, index + 1)
}
}
},
h(
NButton,
{ circle: true, size: 'small', type: 'info' },
h(NIcon, { style: 'transform: rotate(90deg)' }, () =>
h(SwapOutlined)
)
)
),
h(
NPopconfirm,
{
onPositiveClick() {
outputTableData.splice(index, 1)
}
},
{
trigger: () =>
h(
NButton,
{ circle: true, size: 'small', type: 'error' },
h(NIcon, {}, () => h(DeleteOutlined))
),
default: () =>
t('project.synchronization_definition.delete_confirm')
}
)
])
}