docs: update FQA (#44902)

* docs: update FQA [skip ci]

* test(theme): supplement unit test case

* chore: update docs
This commit is contained in:
2023-09-17 16:17:12 +08:00
committed by GitHub
parent 5ac472d042
commit b24cda1f97
3 changed files with 10 additions and 0 deletions

View File

@@ -289,6 +289,8 @@ describe('Theme', () => {
expect(token2.colorLink).toEqual(token2.colorInfo);
expect(token2.colorLinkHover).toEqual(token2.colorInfoHover);
expect(token2.colorLinkActive).toEqual(token2.colorInfoActive);
// colorInfo should not follow colorPrimary
expect(token2.colorLink).not.toEqual('#189cff');
const token3 = getHookToken({ algorithm: [theme.darkAlgorithm] });
expect(token3.colorLink).toEqual(token3.colorInfo);

View File

@@ -211,6 +211,10 @@ Please ref document [Shadow Dom Usage](/docs/react/customize-theme#shadow-dom-us
Please ref dynamic theme document [SSR](/docs/react/customize-theme#server-side-render-ssr) part.
## What is the relationship between colorPrimary and colorInfo and colorLink in V5?
In the Ant Design Token system, `colorPrimary` and `colorInfo` are both [Seed Token](../react/customize-theme.en-US.md#seed-token), so they are independent of each other. `colorLink` is an [Alias Token](../react/customize-theme.en-US.md#alias-token), inherits `colorInfo` by default, and is independent of `colorPrimary`.
## How to spell Ant Design correctly?
-**Ant Design**: Capitalized with space, for the design language.

View File

@@ -239,6 +239,10 @@ import { ConfigProvider } from 'antd';
请参考动态主题文档 [服务端渲染](/docs/react/customize-theme-cn#服务端渲染) 部分内容。
## V5 中 colorPrimary 和 colorInfo 及 colorLink 之间是什么关系?
在 Ant Design Token 系统中 `colorPrimary``colorInfo` 同属于 [基础变量Seed Token](../react/customize-theme.zh-CN.md#基础变量seed-token),所以两者是互相独立的。`colorLink` 则属于 [别名变量Alias Token](../react/customize-theme.zh-CN.md#别名变量alias-token), 默认继承 `colorInfo` 且和 `colorPrimary` 无关。
## 如何正确的拼写 Ant Design
-**Ant Design**:用空格分隔的首字母大写单词,指代设计语言。