mirror of
				https://github.com/1Panel-dev/1Panel.git
				synced 2025-10-31 11:15:58 +08:00 
			
		
		
		
	fix: 解决删除失败无法关闭弹窗的BUG
This commit is contained in:
		
							parent
							
								
									e1f0079585
								
							
						
					
					
						commit
						c6ad2f9a8e
					
				
					 1 changed files with 18 additions and 9 deletions
				
			
		|  | @ -29,20 +29,29 @@ export const useDeleteData = <P = any, R = any>( | |||
|                 if (action === 'confirm') { | ||||
|                     instance.confirmButtonLoading = true; | ||||
|                     instance.cancelButtonLoading = true; | ||||
|                     const res = await api(params); | ||||
|                     done(); | ||||
|                     if (!res) return reject(false); | ||||
|                     resolve(true); | ||||
|                     ElMessage({ | ||||
|                         type: 'success', | ||||
|                         message: i18n.global.t('commons.msg.operationSuccess'), | ||||
|                     }); | ||||
| 
 | ||||
|                     await api(params) | ||||
|                         .then((res) => { | ||||
|                             done(); | ||||
|                             if (!res) return reject(false); | ||||
|                             resolve(true); | ||||
|                             ElMessage({ | ||||
|                                 type: 'success', | ||||
|                                 message: i18n.global.t('commons.msg.operationSuccess'), | ||||
|                             }); | ||||
|                         }) | ||||
|                         .finally(() => { | ||||
|                             instance.confirmButtonLoading = false; | ||||
|                             instance.cancelButtonLoading = false; | ||||
|                         }); | ||||
|                 } else { | ||||
|                     done(); | ||||
|                 } | ||||
|             }, | ||||
|         }) | ||||
|             .then(() => {}) | ||||
|             .then(() => { | ||||
|                 console.log('1111'); | ||||
|             }) | ||||
|             .catch(() => {}); | ||||
|     }); | ||||
| }; | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue