File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 8484 <div class =" create-dataset__footer text-right border-t" >
8585 <el-button @click =" router.go(-1)" >{{ $t('common.cancel') }}</el-button >
8686
87- <el-button @click =" submit" type =" primary" >
87+ <el-button @click =" submit" type =" primary" :disabled = " disabled " >
8888 {{ $t('views.document.buttons.import') }}
8989 </el-button >
9090 </div >
@@ -174,6 +174,7 @@ const handleAllCheckChange = (checked: boolean) => {
174174
175175function submit() {
176176 loading .value = true
177+ disabled .value = true
177178 // 选中的节点的token
178179 const checkedNodes = treeRef .value ?.getCheckedNodes () || []
179180 const filteredNodes = checkedNodes .filter ((node : any ) => ! node .is_exist )
@@ -188,11 +189,15 @@ function submit() {
188189 .importLarkDocument (datasetId , newList , loading )
189190 .then ((res ) => {
190191 MsgSuccess (t (' views.document.tip.importMessage' ))
192+ disabled .value = false
191193 router .go (- 1 )
192194 })
193195 .catch ((err ) => {
194196 console .error (' Failed to load tree nodes:' , err )
195197 })
198+ .finally (() => {
199+ disabled .value = false
200+ })
196201 loading .value = false
197202}
198203
You can’t perform that action at this time.
0 commit comments