Repository navigation
fix: style - #7732
Merged
Merged
fix: style#7732
Conversation
shaohuzhang1
commented
Nov 6, 2026
| class="text-N600!" | ||
| /> | ||
| <template v-if="application.is_publish"> | ||
| <el-divider direction="vertical" /> |
Contributor
Author
There was a problem hiding this comment.
Code Review
✅ No critical issues found. The change is small and low-risk, but here are some observations:
Potential Issues
-
Inconsistent styling between branches
- Portal status uses
type="custom"with a hardcoded label "已上架" + custom class. - Non-portal uses
:activetoggle. Both now gettext-N600!, which forces gray text on all states (published, unpublished, portal). If published/unpublished previously had distinct colors, forcingtext-N600!everywhere may have removed that visual distinction — verify this is intentional.
- Portal status uses
-
Magic strings / i18n
- Hardcoded Chinese labels ("已上架", "已发布", "未发布") — consider using i18n translation keys for maintainability.
-
Verbosity of the "已上架" branch
- It repeats 4 props (
label,icon,class) compared to the conditional branch's data-driven style. Could passapplication.is_publish ? '已发布' : '未发布'as a single computed label to simplify.
- It repeats 4 props (
Optimization Suggestions
<MkStatusLabel
v-if="application.is_portal"
type="custom"
label="已上架"
icon="icon_launch"
class="text-N600!"
/>-
Consider extracting
text-N600!into a shared class or making it a prop/default inMkStatusLabelif this pattern recurs, instead of repeating!importantoverrides at call sites. -
icon_launchnaming — ensure the icon constants are referenced consistently (some places use'icon_time_filled'as string; ensure they're validated).
Summary: Functionally fine; mainly check whether uniformly forcing text-N600! removes intended state colors, and consider moving hardcoded labels to i18n.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix: style