Skip to content

feat(module:tag): export NzTagColor type - #9314

Merged
Laffery merged 1 commit into
NG-ZORRO:masterfrom
HyperLife1119:feat/tag-color-type
Aug 22, 2025
Merged

Laffery merged 1 commit into
NG-ZORRO:masterfrom
HyperLife1119:feat/tag-color-type

Conversation

@HyperLife1119

@HyperLife1119 HyperLife1119 commented Aug 6, 2025 •

Copy link
Copy Markdown
Collaborator

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Application (the showcase website) / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@codecov

codecov Bot commented Aug 6, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.12%. Comparing base (d3bc0ee) to head (4985f74).
⚠️ Report is 19 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #9314   +/-   ##
=======================================
  Coverage   92.12%   92.12%           
=======================================
  Files         561      561           
  Lines       19627    19627           
  Branches     3106     3106           
=======================================
  Hits        18082    18082           
  Misses       1206     1206           
  Partials      339      339           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Laffery Laffery left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

新增类型,改为 target-minor

Comment thread components/tag/typings.ts

import { NzPresetColor, NzStatusColor } from 'ng-zorro-antd/core/color';

export type NzTagColor = NzPresetColor | NzStatusColor | (string & {});

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

string & {}· 是?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

image

这是一个 TS 类型技巧,可以让这样的字符串联合类型获得类型提示

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

👍学到了

@Laffery Laffery left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@Laffery Laffery added this to the v20.2 milestone Aug 7, 2025
@Laffery
Laffery merged commit 1efd29e into NG-ZORRO:master Aug 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants