Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Application history log interface loading status display error #2151

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

shaohuzhang1
Copy link
Contributor

fix: Application history log interface loading status display error

@@ -562,7 +564,7 @@ function saveCleanTime() {
.then(() => {
MsgSuccess(t('common.saveSuccess'))
dialogVisible.value = false
getDetail()
getDetail(true)
})
.catch(() => {
dialogVisible.value = false
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this code snippet, there are several minor improvements and optimizations:

  1. Type Annotations: Replace any with Ref<any> to improve type safety while utilizing Vue's reactivity system.

  2. Use of Parameters: The parameter definition for the getDetail function allows passing an optional boolean (isLoading) which sets the loading status dynamically. This is beneficial when you want to control whether the loading should occur or not based on certain conditions.

  3. Function Parameter Naming: Changed id as string to just id since it can be reliably converted to a string during the function call without needing explicit casting.

These changes enhance the readability, maintainability, and performance of the code by improving typesafety and reducing unnecessary conversions.

@shaohuzhang1 shaohuzhang1 merged commit 06feeec into main Feb 7, 2025
4 checks passed
@shaohuzhang1 shaohuzhang1 deleted the pr@main@fix_history_log branch February 7, 2025 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant