fix(Data Source): Unable to save after deleting all table relationships.

This commit is contained in:
dataeaseShu
2026-03-18 13:56:26 +08:00
parent f63cf2a9cb
commit 528c1db73a
+2 -2
View File
@@ -406,7 +406,7 @@ const drop = (e: any) => {
})
}
const save = () => {
datasourceApi.relationSave(props.id, graph.toJSON().cells).then(() => {
datasourceApi.relationSave(props.id, graph ? graph.toJSON().cells : []).then(() => {
ElMessage({
type: 'success',
message: t('common.save_success'),
@@ -447,7 +447,7 @@ const save = () => {
@drop.prevent.stop="drop"
></div>
<div class="save-btn">
<el-button v-if="nodeIds.length" type="primary" @click="save">
<el-button type="primary" @click="save">
{{ t('common.save') }}
</el-button>
</div>