Skip to content

Commit

Permalink
fix(tests): 移除多余的空行以清理代码
Browse files Browse the repository at this point in the history
  • Loading branch information
chenshuai2144 committed Feb 17, 2025
1 parent 45e6823 commit 32cb3b8
Show file tree
Hide file tree
Showing 15 changed files with 125 additions and 158 deletions.
8 changes: 8 additions & 0 deletions docs/changelog.en-US.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## @ant-design/pro-components@2.8.6

`2025-02-17`

- fix(form):fixed an issue where queryFilter controls were abnormally hidden (#8564). [#8564](https://github.com/ant-design/pro-components/pull/#8564) [@Lemonnnnnnnnnnn](https://github.com/Lemonnnnnnnnnnn)
- fix(form): 修复刷新之后 label 丢失的情况 (#8982). [#8982](https://github.com/ant-design/pro-components/pull/#8982) [@LovePlayCode](https://github.com/LovePlayCode)
- fix(table): resolve EditableProTable Form.Item shouldUpdate conflict with dependencies (#8986). [#8986](https://github.com/ant-design/pro-components/pull/#8986) [@drizzlesconsin](https://github.com/drizzlesconsin)

## @ant-design/pro-components@2.8.5

`2025-02-12`
Expand Down
8 changes: 8 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## @ant-design/pro-components@2.8.6

`2025-02-17`

- fix(form):fixed an issue where queryFilter controls were abnormally hidden (#8564). [#8564](https://github.com/ant-design/pro-components/pull/#8564) [@Lemonnnnnnnnnnn](https://github.com/Lemonnnnnnnnnnn)
- fix(form): 修复刷新之后 label 丢失的情况 (#8982). [#8982](https://github.com/ant-design/pro-components/pull/#8982) [@LovePlayCode](https://github.com/LovePlayCode)
- fix(table): resolve EditableProTable Form.Item shouldUpdate conflict with dependencies (#8986). [#8986](https://github.com/ant-design/pro-components/pull/#8986) [@drizzlesconsin](https://github.com/drizzlesconsin)

## @ant-design/pro-components@2.8.5

`2025-02-12`
Expand Down
7 changes: 1 addition & 6 deletions packages/card/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
# Change Log

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.9.6](https://github.com/ant-design/pro-components/compare/@ant-design/pro-card@2.9.5...@ant-design/pro-card@2.9.6) (2025-02-17)

**Note:** Version bump only for package @ant-design/pro-card





## [2.9.5](https://github.com/ant-design/pro-components/compare/@ant-design/pro-card@2.9.4...@ant-design/pro-card@2.9.5) (2025-02-12)

**Note:** Version bump only for package @ant-design/pro-card
Expand Down
7 changes: 1 addition & 6 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
# Change Log

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.8.6](https://github.com/ant-design/pro-components/compare/@ant-design/pro-components@2.8.5...@ant-design/pro-components@2.8.6) (2025-02-17)

**Note:** Version bump only for package @ant-design/pro-components





## [2.8.5](https://github.com/ant-design/pro-components/compare/@ant-design/pro-components@2.8.4...@ant-design/pro-components@2.8.5) (2025-02-12)

**Note:** Version bump only for package @ant-design/pro-components
Expand Down
7 changes: 1 addition & 6 deletions packages/descriptions/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
# Change Log

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.6.6](https://github.com/ant-design/pro-components/compare/@ant-design/pro-descriptions@2.6.5...@ant-design/pro-descriptions@2.6.6) (2025-02-17)

**Note:** Version bump only for package @ant-design/pro-descriptions





## [2.6.5](https://github.com/ant-design/pro-components/compare/@ant-design/pro-descriptions@2.6.4...@ant-design/pro-descriptions@2.6.5) (2025-02-12)

**Note:** Version bump only for package @ant-design/pro-descriptions
Expand Down
10 changes: 2 additions & 8 deletions packages/field/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
# Change Log

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [3.0.3](https://github.com/ant-design/pro-components/compare/@ant-design/pro-field@3.0.2...@ant-design/pro-field@3.0.3) (2025-02-17)


### Bug Fixes

* **form:** 修复刷新之后 label 丢失的情况 ([#8982](https://github.com/ant-design/pro-components/issues/8982)) ([93b2c28](https://github.com/ant-design/pro-components/commit/93b2c28a6d5624be2e57f0ac3ab906b778332a72))




- **form:** 修复刷新之后 label 丢失的情况 ([#8982](https://github.com/ant-design/pro-components/issues/8982)) ([93b2c28](https://github.com/ant-design/pro-components/commit/93b2c28a6d5624be2e57f0ac3ab906b778332a72))

## [3.0.2](https://github.com/ant-design/pro-components/compare/@ant-design/pro-field@3.0.1...@ant-design/pro-field@3.0.2) (2025-02-12)

Expand Down
10 changes: 2 additions & 8 deletions packages/form/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
# Change Log

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.31.6](https://github.com/ant-design/pro-components/compare/@ant-design/pro-form@2.31.5...@ant-design/pro-form@2.31.6) (2025-02-17)


### Bug Fixes

* **SchemaForm:** 修复SchemaForm renderFormItem 警告 ([#8991](https://github.com/ant-design/pro-components/issues/8991)) ([52cab46](https://github.com/ant-design/pro-components/commit/52cab46114861071ff0610ab6ab3cbd69de094c7))




- **SchemaForm:** 修复SchemaForm renderFormItem 警告 ([#8991](https://github.com/ant-design/pro-components/issues/8991)) ([52cab46](https://github.com/ant-design/pro-components/commit/52cab46114861071ff0610ab6ab3cbd69de094c7))

## [2.31.5](https://github.com/ant-design/pro-components/compare/@ant-design/pro-form@2.31.4...@ant-design/pro-form@2.31.5) (2025-02-12)

Expand Down
2 changes: 1 addition & 1 deletion packages/form/src/components/QueryFilter/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ QueryFilter supports the following properties in addition to the API inherited f
| hideRequiredMark | Hide the required markers for all form items, **hide by default** | `boolean` | true |
| submitterColSpanProps | Props of the col where the submit button is located. | ColProps | - |
| defaultColsNumber | The default number of form controls displayed in a collapsed state. Only one row of controls is displayed at most, and when exceeded, a collapse/hide button is shown. | `number` | - |
| defaultFormItemsNumber | The difference from defaultColsNumber is that the specified number of controls will be displayed, and when exceeded, a collapse/hide button will be shown. | `number` | - |
| defaultFormItemsNumber | The difference from defaultColsNumber is that the specified number of controls will be displayed, and when exceeded, a collapse/hide button will be shown. | `number` | - |
| labelWidth | label width | `number` \| `'auto'` | `98` |
| span | width of form items | `number[0 - 24]` | - |
| split | whether each line has a split line | `boolean` | - |
Expand Down
13 changes: 7 additions & 6 deletions packages/form/src/layouts/QueryFilter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export type BaseQueryFilterProps = Omit<
layout?: FormProps['layout'];
/**
* @name 默认一行显示几个表单项
*/
*/
defaultColsNumber?: number;
/**
* @name 默认展示几个表单项
Expand Down Expand Up @@ -352,8 +352,7 @@ const QueryFilterContent: React.FC<{
(firstRowFull ||
// 如果 超过显示长度 且 总长度超过了 24
totalSize > showLength) &&
!!index
);
!!index);

itemLength += 1;

Expand Down Expand Up @@ -542,13 +541,15 @@ function QueryFilter<T = Record<string, any>>(props: QueryFilterProps<T>) {
);

const showLength = useMemo(() => {
if(defaultFormItemsNumber !== undefined) {
return defaultFormItemsNumber
if (defaultFormItemsNumber !== undefined) {
return defaultFormItemsNumber;
}
if (defaultColsNumber !== undefined) {
// 折叠为一行,需要处理多行的情况请使用 defaultFormItemsNumber
const oneRowControlsNumber = 24 / spanSize.span - 1;
return defaultColsNumber > oneRowControlsNumber ? oneRowControlsNumber : defaultColsNumber
return defaultColsNumber > oneRowControlsNumber
? oneRowControlsNumber
: defaultColsNumber;
}
return Math.max(1, 24 / spanSize.span - 1);
}, [defaultColsNumber, defaultFormItemsNumber, spanSize.span]);
Expand Down
10 changes: 2 additions & 8 deletions packages/layout/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
# Change Log

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [7.22.3](https://github.com/ant-design/pro-components/compare/@ant-design/pro-layout@7.22.2...@ant-design/pro-layout@7.22.3) (2025-02-17)


### Bug Fixes

* **SiderMenu:** 优化 collapsed 状态下菜单项文本的渲染逻辑 ([1f3428d](https://github.com/ant-design/pro-components/commit/1f3428d0142c6f4f121ae728b108af2b7656dee5))




- **SiderMenu:** 优化 collapsed 状态下菜单项文本的渲染逻辑 ([1f3428d](https://github.com/ant-design/pro-components/commit/1f3428d0142c6f4f121ae728b108af2b7656dee5))

## [7.22.2](https://github.com/ant-design/pro-components/compare/@ant-design/pro-layout@7.22.1...@ant-design/pro-layout@7.22.2) (2025-02-12)

Expand Down
7 changes: 1 addition & 6 deletions packages/list/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
# Change Log

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.6.6](https://github.com/ant-design/pro-components/compare/@ant-design/pro-list@2.6.5...@ant-design/pro-list@2.6.6) (2025-02-17)

**Note:** Version bump only for package @ant-design/pro-list





## [2.6.5](https://github.com/ant-design/pro-components/compare/@ant-design/pro-list@2.6.4...@ant-design/pro-list@2.6.5) (2025-02-12)

**Note:** Version bump only for package @ant-design/pro-list
Expand Down
10 changes: 2 additions & 8 deletions packages/table/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
# Change Log

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [3.18.6](https://github.com/ant-design/pro-components/compare/@ant-design/pro-table@3.18.5...@ant-design/pro-table@3.18.6) (2025-02-17)


### Bug Fixes

* **table:** resolve EditableProTable Form.Item shouldUpdate conflict with dependencies ([#8986](https://github.com/ant-design/pro-components/issues/8986)) ([3840629](https://github.com/ant-design/pro-components/commit/384062949a0f002521488eff891dc8e1e2a47779))




- **table:** resolve EditableProTable Form.Item shouldUpdate conflict with dependencies ([#8986](https://github.com/ant-design/pro-components/issues/8986)) ([3840629](https://github.com/ant-design/pro-components/commit/384062949a0f002521488eff891dc8e1e2a47779))

## [3.18.5](https://github.com/ant-design/pro-components/compare/@ant-design/pro-table@3.18.4...@ant-design/pro-table@3.18.5) (2025-02-12)

Expand Down
7 changes: 1 addition & 6 deletions packages/utils/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
# Change Log

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.16.4](https://github.com/ant-design/pro-components/compare/@ant-design/pro-utils@2.16.3...@ant-design/pro-utils@2.16.4) (2025-02-17)

**Note:** Version bump only for package @ant-design/pro-utils





## [2.16.3](https://github.com/ant-design/pro-components/compare/@ant-design/pro-utils@2.16.2...@ant-design/pro-utils@2.16.3) (2025-01-06)

### Bug Fixes
Expand Down
Loading

0 comments on commit 32cb3b8

Please sign in to comment.