-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix: upload file style #2953
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: upload file style #2953
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -136,7 +136,7 @@ | |
| > | ||
| <div class="flex-between"> | ||
| <div class="flex align-center"> | ||
| <img class="mr-12" src="@/assets/icon_file-doc.svg" alt="" /> | ||
| <img class="mr-12" :width="32" src="@/assets/fileType/unknown-icon.svg" alt="" /> | ||
| <div> | ||
| <p class="line-height-22 mt-4"> | ||
| {{ $t('common.fileUpload.other') }} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The provided code snippet suggests two changes that could potentially improve efficiency and clarity:
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a few issues and suggestions to improve the provided code:
Duplicate Code: The repeated code block for
<template v-for...>can be refactored into a single component. This will make the code cleaner and more maintainable.Flexbox Layout Improvements:
class="flex-between"should be replaced withflex: space-betweenor similar properties that control equal spacing between elements.Responsive Design:
width="24"is responsive if the card or images need to scale down based on window size or other factors.Icon Styles:
Consider updating the CSS class used for the icons.
Consistent Class Names:
.color-secondaryconsistently across all color definitions, e.g.,.primary-color,.error-color.Also, consider using standard class names like
.delete-buttoninstead of custom ones.Optimization Suggestions:
Implement lazy loading techniques if possible to reduce initial load time, but be cautious not to sacrifice responsiveness too much.
Here’s a simplified version of how some parts of the code could be improved:
Revised Code Snippet
This revision reduces redundancy by extracting common content and behavior into separate classes, making it easier to maintain and understand.