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 62
62
</el-row >
63
63
<!-- 操作 -->
64
64
<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
+ 导入
67
67
</el-button >
68
68
<el-button @click =" close" >关闭</el-button >
69
69
</template >
@@ -139,13 +139,18 @@ const handleSelectionChange = (selection) => {
139
139
140
140
/** 导入按钮操作 */
141
141
const 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
+ }
149
154
}
150
155
const emit = defineEmits ([' success' ])
151
156
</script >
You can’t perform that action at this time.
0 commit comments