Skip to content

Commit

Permalink
Merge branch 'main' into i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedHassanNasr committed Oct 24, 2024
2 parents 5049476 + c3fd7b9 commit 29d2951
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions web/src/view/systemTools/autoCode/component/fieldDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ const getDBTableList = async () => {
}
const dbColumnList = ref([])
const selectDB = async (val) => {
const selectDB = async (val,isInit) => {
middleDate.value.dataSource.table = val
const res = await getColumn({
businessDB: middleDate.value.dataSource.dbName,
Expand All @@ -474,7 +474,7 @@ const selectDB = async (val) => {
isPrimary: item.primaryKey,
comment: item.columnComment
}));
if (dbColumnList.value.length > 0) {
if (dbColumnList.value.length > 0 && !isInit) {
middleDate.value.dataSource.label = dbColumnList.value[0].columnName
middleDate.value.dataSource.value = dbColumnList.value[0].columnName
}
Expand All @@ -488,7 +488,7 @@ defineExpose({ fieldDialogForm })
onMounted(()=>{
getDbFunc()
if(middleDate.value.dataSource.table){
selectDB(middleDate.value.dataSource.table)
selectDB(middleDate.value.dataSource.table,true)
}
})
</script>

0 comments on commit 29d2951

Please sign in to comment.