Skip to content

fix: style - #7732

Merged
wangdan-fit2cloud merged 1 commit into
v3from
pr@v3@fix_style
Nov 6, 2026
Merged

wangdan-fit2cloud merged 1 commit into
v3from
pr@v3@fix_style

Conversation

@shaohuzhang1

Copy link
Copy Markdown
Contributor

fix: style

class="text-N600!"
/>
<template v-if="application.is_publish">
<el-divider direction="vertical" />

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Code Review

✅ No critical issues found. The change is small and low-risk, but here are some observations:

Potential Issues

  1. Inconsistent styling between branches

    • Portal status uses type="custom" with a hardcoded label "已上架" + custom class.
    • Non-portal uses :active toggle. Both now get text-N600!, which forces gray text on all states (published, unpublished, portal). If published/unpublished previously had distinct colors, forcing text-N600! everywhere may have removed that visual distinction — verify this is intentional.
  2. Magic strings / i18n

    • Hardcoded Chinese labels ("已上架", "已发布", "未发布") — consider using i18n translation keys for maintainability.
  3. Verbosity of the "已上架" branch

    • It repeats 4 props (label, icon, class) compared to the conditional branch's data-driven style. Could pass application.is_publish ? '已发布' : '未发布' as a single computed label to simplify.

Optimization Suggestions

<MkStatusLabel
  v-if="application.is_portal"
  type="custom"
  label="已上架"
  icon="icon_launch"
  class="text-N600!"
/>
  1. Consider extracting text-N600! into a shared class or making it a prop/default in MkStatusLabel if this pattern recurs, instead of repeating !important overrides at call sites.

  2. icon_launch naming — 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.

@wangdan-fit2cloud
wangdan-fit2cloud merged commit 58fbdf0 into v3 Nov 6, 2026
3 of 4 checks passed
@wangdan-fit2cloud
wangdan-fit2cloud deleted the pr@v3@fix_style branch November 6, 2026 10:22
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.

2 participants