Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 1 addition & 20 deletions frontend/src/views/ds/DataTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ const editField = (row: any) => {
fieldDialog.value = true
}

const setStatus = (row: any) => {
const changeStatus = (row: any) => {
currentField.value = row
datasourceApi.saveField(currentField.value).then(() => {
closeField()
Expand All @@ -223,25 +223,6 @@ const setStatus = (row: any) => {
})
}

const changeStatus = (row: any) => {
if (!row.checked) {
row.checked = true
ElMessageBox.confirm(t('prompt.disable_field'), {
type: 'warning',
confirmButtonType: 'primary',
tip: t('prompt.to_disable_it'),
confirmButtonText: t('common.confirm2'),
cancelButtonText: t('common.cancel'),
autofocus: false,
}).then(() => {
row.checked = false
setStatus(row)
})
return
}
setStatus(row)
}

const emits = defineEmits(['back', 'refresh'])
const back = () => {
emits('back')
Expand Down