perf: 代码优化 components/Screenfull 和 hooks/useFullscreenLoading

This commit is contained in:
pany
2023-05-22 13:44:48 +08:00
parent d66528f40a
commit d50cba28af
2 changed files with 2 additions and 7 deletions

View File

@@ -26,8 +26,7 @@ export const useFullscreenLoading: UseFullscreenLoading = (fn, options = {}) =>
return async (...args) => {
try {
loadingInstance = ElLoading.service({ ...defaultOptions, ...options })
const result = await fn(...args)
return result
return await fn(...args)
} finally {
loadingInstance?.close()
}