diff --git a/frontend/src/views/ds/TableList.vue b/frontend/src/views/ds/TableList.vue
index 929951a0..77be2fc3 100644
--- a/frontend/src/views/ds/TableList.vue
+++ b/frontend/src/views/ds/TableList.vue
@@ -105,7 +105,7 @@
@closed="closeTable"
>
{{ t('ds.edit.table_comment_label') }}
-
+
{{ t('common.cancel') }}
{{ t('common.confirm') }}
@@ -121,7 +121,7 @@
@closed="closeField"
>
{{ t('ds.edit.field_comment_label') }}
-
+
{{ t('common.cancel') }}
{{ t('common.confirm') }}
@@ -163,6 +163,8 @@ const tableDialog = ref
(false)
const fieldDialog = ref(false)
const dsForm = ref()
const ds = ref({})
+const tableComment = ref('')
+const fieldComment = ref('')
const buildData = () => {
return { table: currentTable.value, fields: fieldList.value }
@@ -183,6 +185,7 @@ const back = () => {
// };
const editTable = () => {
+ tableComment.value = currentTable.value.custom_comment
tableDialog.value = true
}
@@ -191,10 +194,11 @@ const closeTable = () => {
}
const saveTable = () => {
+ currentTable.value.custom_comment = tableComment.value
datasourceApi.saveTable(currentTable.value).then(() => {
closeTable()
ElMessage({
- message: 'Edit Success',
+ message: t('common.save_success'),
type: 'success',
showClose: true,
})
@@ -203,6 +207,7 @@ const saveTable = () => {
const editField = (row: any) => {
currentField.value = row
+ fieldComment.value = currentField.value.custom_comment
fieldDialog.value = true
}
@@ -216,10 +221,11 @@ const closeField = () => {
}
const saveField = () => {
+ currentField.value.custom_comment = fieldComment.value
datasourceApi.saveField(currentField.value).then(() => {
closeField()
ElMessage({
- message: 'Edit Success',
+ message: t('common.save_success'),
type: 'success',
showClose: true,
})