in seatunnel-ui/src/views/task/synchronization-definition/dag/use-model-columns.ts [406:450]
title: t('project.synchronization_definition.field_name'),
key: 'name',
...COLUMN_WIDTH_CONFIG['name'],
render: (row: any, index) => {
// Mark the same field name value in red.
const onlyNameColumnTableData = outputTableData.map((o: any) => o.name)
return row.copyTimes !== -1 ?
h('span', { class: onlyNameColumnTableData.indexOf(row.name) !== onlyNameColumnTableData.lastIndexOf(row.name) && 'row-error' }, row.name)
: row.isEdit ?
h(NFormItem,
{
showLabel: false,
validationStatus: !row.name ? 'error' : 'success',
feedback: !row.name
? t('project.synchronization_definition.name_tips')
: ''
},
() =>
h(NInput, {
value: outputTableData[index].name,
onUpdateValue(v) {
outputTableData[index].name = v
},
onBlur() {
outputTableData[index].isEdit = false
}
})
)
: // @ts-ignore
h('div', { align: 'center', style: { display: 'flex', 'flex-wrap': 'no-wrap', 'align-items': 'center' } }, [
h(NEllipsis, {}, [row.name as any]),
h(
NButton,
{
quaternary: true,
circle: true,
size: 'small',
onClick() {
outputTableData[index].isEdit = true
}
},
{ icon: h(NIcon, null, () => h(EditOutlined)) }
)
])
}