title: t()

in seatunnel-ui/src/views/task/synchronization-definition/dag/use-model-columns.ts [468:524]


        title: t('project.synchronization_definition.operation'),
        key: 'operation',
        ...COLUMN_WIDTH_CONFIG['operation'](1),
        width: 60,
        render(row: any, index: number) {
          return row.copyTimes === -1
            ? 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')
                }
              )
            : h(
                NTooltip,
                {},
                {
                  trigger: () =>
                    h(
                      NButton,
                      {
                        circle: true,
                        size: 'small',
                        type: 'info',
                        onClick() {
                          const result = outputTableData.filter(
                            (o: any) => (o.original_field === row.original_field) && (o.original_field !== o.name)
                          )

                          const maxCopyTimes: any = max(result.map((r: any) => Number(r.name.split(r.original_field)[1])))

                          outputTableData[index].copyTimes = (maxCopyTimes ?? 0) + 1
                          outputTableData.push({
                            ...row,
                            name: row.name + row.copyTimes,
                            copyTimes: -1
                          })
                        }
                      },
                      h(NIcon, {}, () => h(CopyOutlined))
                    ),
                  default: () =>
                    t('project.synchronization_definition.copy_field')
                }
              )
        }