From c3fd7b9077f6acbe70598feb714e729f479b6b92 Mon Sep 17 00:00:00 2001 From: pixelmaxQM Date: Mon, 21 Oct 2024 20:16:59 +0800 Subject: [PATCH] =?UTF-8?q?fixed:=20=E4=BF=AE=E5=A4=8D=E4=B8=80=E5=AF=B9?= =?UTF-8?q?=E4=B8=80=E4=B8=80=E5=AF=B9=E5=A4=9A=E7=BC=96=E8=BE=91=E6=97=B6?= =?UTF-8?q?=E5=80=99=EF=BC=8Ckv=E4=B8=A2=E5=A4=B1=E7=9A=84bug=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/view/systemTools/autoCode/component/fieldDialog.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/src/view/systemTools/autoCode/component/fieldDialog.vue b/web/src/view/systemTools/autoCode/component/fieldDialog.vue index 4a00b68907..b5ab1e6269 100644 --- a/web/src/view/systemTools/autoCode/component/fieldDialog.vue +++ b/web/src/view/systemTools/autoCode/component/fieldDialog.vue @@ -456,7 +456,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, @@ -472,7 +472,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 } @@ -486,7 +486,7 @@ defineExpose({ fieldDialogForm }) onMounted(()=>{ getDbFunc() if(middleDate.value.dataSource.table){ - selectDB(middleDate.value.dataSource.table) + selectDB(middleDate.value.dataSource.table,true) } })