File tree Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change 6262 </el-row >
6363 <!-- 操作 -->
6464 <template #footer >
65- <el-button :disabled =" tableList.length === 0" type =" primary" @click =" handleImportTable" >
66- 导入
65+ <el-button :disabled =" tableList.length === 0 || dbTableLoading " type =" primary" @click =" handleImportTable" >
66+ 导入
6767 </el-button >
6868 <el-button @click =" close" >关闭</el-button >
6969 </template >
@@ -139,13 +139,18 @@ const handleSelectionChange = (selection) => {
139139
140140/** 导入按钮操作 */
141141const handleImportTable = async () => {
142- await CodegenApi .createCodegenList ({
143- dataSourceConfigId: queryParams .dataSourceConfigId ,
144- tableNames: tableList .value
145- })
146- message .success (' 导入成功' )
147- emit (' success' )
148- close ()
142+ dbTableLoading .value = true
143+ try {
144+ await CodegenApi .createCodegenList ({
145+ dataSourceConfigId: queryParams .dataSourceConfigId ,
146+ tableNames: tableList .value
147+ })
148+ message .success (' 导入成功' )
149+ emit (' success' )
150+ close ()
151+ } finally {
152+ dbTableLoading .value = false
153+ }
149154}
150155const emit = defineEmits ([' success' ])
151156 </script >
You can’t perform that action at this time.
0 commit comments