docs: add changelog

This commit is contained in:
期贤 2024-03-15 14:43:13 +08:00
parent bd56173fdc
commit b38df4b04b
22 changed files with 129 additions and 196 deletions

View File

@ -1,6 +1,4 @@
{
"extends": "../tsconfig.json",
"include": [
"**/*"
]
}
"include": ["**/*"]
}

View File

@ -198,7 +198,6 @@ Copyright © 2023 - present [AFX][ant-design-link] & [Ant Digital](https://antdi
[pr-welcome-link]: https://github.com/ant-design/pro-components/pulls
[pr-welcome-shield]: https://img.shields.io/badge/%E2%9D%A4%EF%B8%8F%20PR%20WELCOME-%E2%86%92-1677FF?labelColor=black&style=for-the-badge
## Star History
[![Star History Chart](https://api.star-history.com/svg?repos=ant-design/pro-components&type=Date)](https://star-history.com/#ant-design/pro-components&Date)
[![Star History Chart](https://api.star-history.com/svg?repos=ant-design/pro-components&type=Date)](https://star-history.com/#ant-design/pro-components&Date)

View File

@ -198,7 +198,6 @@ Copyright © 2023 - present [AFX][ant-design-link] & [Ant Digital](https://antdi
[pr-welcome-link]: https://github.com/ant-design/pro-components/pulls
[pr-welcome-shield]: https://img.shields.io/badge/%E2%9D%A4%EF%B8%8F%20PR%20WELCOME-%E2%86%92-1677FF?labelColor=black&style=for-the-badge
## Star 趋势
[![Star History Chart](https://api.star-history.com/svg?repos=ant-design/pro-components&type=Date)](https://star-history.com/#ant-design/pro-components&Date)
[![Star History Chart](https://api.star-history.com/svg?repos=ant-design/pro-components&type=Date)](https://star-history.com/#ant-design/pro-components&Date)

View File

@ -1,3 +1,13 @@
## @ant-design/pro-components@2.6.50
`2024-03-15`
- fix(components): remove deprecated tip props. [85de8a2](https://github.com/ant-design/pro-components/commit/85de8a2)
- fix(components): compatible 5.13.0 border. [ddf0c82](https://github.com/ant-design/pro-components/commit/ddf0c82)
- fix(form): PasswordStrength support morse options. [3ab9f11](https://github.com/ant-design/pro-components/commit/3ab9f11)
- fix(list): support add string line. [9ec366d](https://github.com/ant-design/pro-components/commit/9ec366d)
- feat(table): add click event for icon element (#8167). [#8167](https://github.com/ant-design/pro-components/pull/#8167) [@Been101](https://github.com/Been101)
## @ant-design/pro-components@2.6.49
`2024-01-31`

View File

@ -1,3 +1,13 @@
## @ant-design/pro-components@2.6.50
`2024-03-15`
- fix(components): remove deprecated tip props. [85de8a2](https://github.com/ant-design/pro-components/commit/85de8a2)
- fix(components): compatible 5.13.0 border. [ddf0c82](https://github.com/ant-design/pro-components/commit/ddf0c82)
- fix(form): PasswordStrength support morse options. [3ab9f11](https://github.com/ant-design/pro-components/commit/3ab9f11)
- fix(list): support add string line. [9ec366d](https://github.com/ant-design/pro-components/commit/9ec366d)
- feat(table): add click event for icon element (#8167). [#8167](https://github.com/ant-design/pro-components/pull/#8167) [@Been101](https://github.com/Been101)
## @ant-design/pro-components@2.6.49
`2024-01-31`

View File

@ -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.5.30](https://github.com/ant-design/pro-components/compare/@ant-design/pro-card@2.5.29...@ant-design/pro-card@2.5.30) (2024-03-15)
### Bug Fixes
* **components:** remove deprecated tip props ([85de8a2](https://github.com/ant-design/pro-components/commit/85de8a2bad41a21254719ff7f1df5328e42fd0fb))
- **components:** remove deprecated tip props ([85de8a2](https://github.com/ant-design/pro-components/commit/85de8a2bad41a21254719ff7f1df5328e42fd0fb))
## [2.5.29](https://github.com/ant-design/pro-components/compare/@ant-design/pro-card@2.5.28...@ant-design/pro-card@2.5.29) (2024-01-15)

View File

@ -1,24 +1,15 @@
# 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.50](https://github.com/ant-design/pro-components/compare/@ant-design/pro-components@2.6.49...@ant-design/pro-components@2.6.50) (2024-03-15)
**Note:** Version bump only for package @ant-design/pro-components
## [2.6.49](https://github.com/ant-design/pro-components/compare/@ant-design/pro-components@2.6.48...@ant-design/pro-components@2.6.49) (2024-01-31)
**Note:** Version bump only for package @ant-design/pro-components
## [2.6.48](https://github.com/ant-design/pro-components/compare/@ant-design/pro-components@2.6.47...@ant-design/pro-components@2.6.48) (2024-01-18)
**Note:** Version bump only for package @ant-design/pro-components

View File

@ -1,27 +1,17 @@
# 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.5.34](https://github.com/ant-design/pro-components/compare/@ant-design/pro-descriptions@2.5.33...@ant-design/pro-descriptions@2.5.34) (2024-03-15)
### Bug Fixes
* **components:** remove deprecated tip props ([85de8a2](https://github.com/ant-design/pro-components/commit/85de8a2bad41a21254719ff7f1df5328e42fd0fb))
- **components:** remove deprecated tip props ([85de8a2](https://github.com/ant-design/pro-components/commit/85de8a2bad41a21254719ff7f1df5328e42fd0fb))
## [2.5.33](https://github.com/ant-design/pro-components/compare/@ant-design/pro-descriptions@2.5.32...@ant-design/pro-descriptions@2.5.33) (2024-01-31)
**Note:** Version bump only for package @ant-design/pro-descriptions
## [2.5.32](https://github.com/ant-design/pro-components/compare/@ant-design/pro-descriptions@2.5.31...@ant-design/pro-descriptions@2.5.32) (2024-01-18)
**Note:** Version bump only for package @ant-design/pro-descriptions

View File

@ -1,31 +1,20 @@
# 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.14.7](https://github.com/ant-design/pro-components/compare/@ant-design/pro-field@2.14.6...@ant-design/pro-field@2.14.7) (2024-03-15)
### Bug Fixes
* **components:** compatible 5.13.0 border ([ddf0c82](https://github.com/ant-design/pro-components/commit/ddf0c82b5a9e55546c1b864e76972621b501769b))
* **components:** remove deprecated tip props ([85de8a2](https://github.com/ant-design/pro-components/commit/85de8a2bad41a21254719ff7f1df5328e42fd0fb))
- **components:** compatible 5.13.0 border ([ddf0c82](https://github.com/ant-design/pro-components/commit/ddf0c82b5a9e55546c1b864e76972621b501769b))
- **components:** remove deprecated tip props ([85de8a2](https://github.com/ant-design/pro-components/commit/85de8a2bad41a21254719ff7f1df5328e42fd0fb))
## [2.14.6](https://github.com/ant-design/pro-components/compare/@ant-design/pro-field@2.14.5...@ant-design/pro-field@2.14.6) (2024-01-31)
### Bug Fixes
* **field:** fieldProps.options not effective in ProFormSegmented ([#8129](https://github.com/ant-design/pro-components/issues/8129)) ([a76d570](https://github.com/ant-design/pro-components/commit/a76d570e258de2eb6d6a974deb33019b6ae4e736))
* 修复ProFormSelect/LightSelect选中之后没有自动隐藏和fieldProps使用open属性不能效两个问题 ([#8116](https://github.com/ant-design/pro-components/issues/8116)) ([817898f](https://github.com/ant-design/pro-components/commit/817898fabd2f199113ebb8a063d1ffbf0ab22829))
- **field:** fieldProps.options not effective in ProFormSegmented ([#8129](https://github.com/ant-design/pro-components/issues/8129)) ([a76d570](https://github.com/ant-design/pro-components/commit/a76d570e258de2eb6d6a974deb33019b6ae4e736))
- 修复 ProFormSelect/LightSelect 选中之后没有自动隐藏和 fieldProps 使用 open 属性不能效两个问题 ([#8116](https://github.com/ant-design/pro-components/issues/8116)) ([817898f](https://github.com/ant-design/pro-components/commit/817898fabd2f199113ebb8a063d1ffbf0ab22829))
## [2.14.5](https://github.com/ant-design/pro-components/compare/@ant-design/pro-field@2.14.4...@ant-design/pro-field@2.14.5) (2024-01-15)

View File

@ -19,11 +19,15 @@ const FieldSegmented: ProFieldFC<
text: string;
emptyText?: React.ReactNode;
} & FieldSelectProps
> = (
props,
ref,
) => {
const { mode, render, renderFormItem, fieldProps, emptyText = '-', ...rest } = props;
> = (props, ref) => {
const {
mode,
render,
renderFormItem,
fieldProps,
emptyText = '-',
...rest
} = props;
const inputRef = useRef<HTMLInputElement>();

View File

@ -1,30 +1,20 @@
# 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.24.5](https://github.com/ant-design/pro-components/compare/@ant-design/pro-form@2.24.4...@ant-design/pro-form@2.24.5) (2024-03-15)
### Bug Fixes
* **components:** remove deprecated tip props ([85de8a2](https://github.com/ant-design/pro-components/commit/85de8a2bad41a21254719ff7f1df5328e42fd0fb))
* **form:** PasswordStrength support morse options ([3ab9f11](https://github.com/ant-design/pro-components/commit/3ab9f11bf0307d4d0e127cb66c9042c72645dc64))
* **list:** support add string line ([9ec366d](https://github.com/ant-design/pro-components/commit/9ec366d3d1ef09587e48a3d98ab5ffe584f3248c))
* **QueryFilter:** 修复 ProFormDependency 在 QueryFilter 中失效的问题 ([#8212](https://github.com/ant-design/pro-components/issues/8212)) ([fdc5418](https://github.com/ant-design/pro-components/commit/fdc5418b4a12775819a0caafad580236afa7a607))
- **components:** remove deprecated tip props ([85de8a2](https://github.com/ant-design/pro-components/commit/85de8a2bad41a21254719ff7f1df5328e42fd0fb))
- **form:** PasswordStrength support morse options ([3ab9f11](https://github.com/ant-design/pro-components/commit/3ab9f11bf0307d4d0e127cb66c9042c72645dc64))
- **list:** support add string line ([9ec366d](https://github.com/ant-design/pro-components/commit/9ec366d3d1ef09587e48a3d98ab5ffe584f3248c))
- **QueryFilter:** 修复 ProFormDependency 在 QueryFilter 中失效的问题 ([#8212](https://github.com/ant-design/pro-components/issues/8212)) ([fdc5418](https://github.com/ant-design/pro-components/commit/fdc5418b4a12775819a0caafad580236afa7a607))
## [2.24.4](https://github.com/ant-design/pro-components/compare/@ant-design/pro-form@2.24.3...@ant-design/pro-form@2.24.4) (2024-01-31)
**Note:** Version bump only for package @ant-design/pro-form
## [2.24.3](https://github.com/ant-design/pro-components/compare/@ant-design/pro-form@2.24.2...@ant-design/pro-form@2.24.3) (2024-01-18)
**Note:** Version bump only for package @ant-design/pro-form

View File

@ -8,7 +8,7 @@ export default () => {
return (
<ProForm>
<ProFormUploadButton
title='上传按钮的文本变啦'
title="上传按钮的文本变啦"
name="upload"
label="Upload"
max={2}

View File

@ -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.17.20](https://github.com/ant-design/pro-components/compare/@ant-design/pro-layout@7.17.19...@ant-design/pro-layout@7.17.20) (2024-03-15)
### Bug Fixes
* **components:** compatible 5.13.0 border ([ddf0c82](https://github.com/ant-design/pro-components/commit/ddf0c82b5a9e55546c1b864e76972621b501769b))
- **components:** compatible 5.13.0 border ([ddf0c82](https://github.com/ant-design/pro-components/commit/ddf0c82b5a9e55546c1b864e76972621b501769b))
## [7.17.19](https://github.com/ant-design/pro-components/compare/@ant-design/pro-layout@7.17.18...@ant-design/pro-layout@7.17.19) (2024-01-15)

View File

@ -1,24 +1,15 @@
# 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.5.49](https://github.com/ant-design/pro-components/compare/@ant-design/pro-list@2.5.48...@ant-design/pro-list@2.5.49) (2024-03-15)
**Note:** Version bump only for package @ant-design/pro-list
## [2.5.48](https://github.com/ant-design/pro-components/compare/@ant-design/pro-list@2.5.47...@ant-design/pro-list@2.5.48) (2024-01-31)
**Note:** Version bump only for package @ant-design/pro-list
## [2.5.47](https://github.com/ant-design/pro-components/compare/@ant-design/pro-list@2.5.46...@ant-design/pro-list@2.5.47) (2024-01-18)
**Note:** Version bump only for package @ant-design/pro-list

View File

@ -1,23 +1,16 @@
# 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.14.0](https://github.com/ant-design/pro-components/compare/@ant-design/pro-provider@2.13.5...@ant-design/pro-provider@2.14.0) (2024-03-15)
### Features
* allow custom translations ([#8175](https://github.com/ant-design/pro-components/issues/8175)) ([7971294](https://github.com/ant-design/pro-components/commit/797129468d1813bafd44ecc1924ca1f9a3ca6950))
- allow custom translations ([#8175](https://github.com/ant-design/pro-components/issues/8175)) ([7971294](https://github.com/ant-design/pro-components/commit/797129468d1813bafd44ecc1924ca1f9a3ca6950))
### Performance Improvements
* 优化 config provider context 频繁触发渲染问题 ([#8196](https://github.com/ant-design/pro-components/issues/8196)) ([7644209](https://github.com/ant-design/pro-components/commit/764420929d21d333bf35bd60e4709237cec1ed52))
- 优化 config provider context 频繁触发渲染问题 ([#8196](https://github.com/ant-design/pro-components/issues/8196)) ([7644209](https://github.com/ant-design/pro-components/commit/764420929d21d333bf35bd60e4709237cec1ed52))
## [2.13.5](https://github.com/ant-design/pro-components/compare/@ant-design/pro-provider@2.13.4...@ant-design/pro-provider@2.13.5) (2023-11-22)

View File

@ -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.1.11](https://github.com/ant-design/pro-components/compare/@ant-design/pro-skeleton@2.1.10...@ant-design/pro-skeleton@2.1.11) (2024-03-15)
### Bug Fixes
* **components:** remove deprecated tip props ([85de8a2](https://github.com/ant-design/pro-components/commit/85de8a2bad41a21254719ff7f1df5328e42fd0fb))
- **components:** remove deprecated tip props ([85de8a2](https://github.com/ant-design/pro-components/commit/85de8a2bad41a21254719ff7f1df5328e42fd0fb))
## [2.1.10](https://github.com/ant-design/pro-components/compare/@ant-design/pro-skeleton@2.1.9...@ant-design/pro-skeleton@2.1.10) (2023-11-22)

View File

@ -1,34 +1,23 @@
# 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.15.0](https://github.com/ant-design/pro-components/compare/@ant-design/pro-table@3.14.2...@ant-design/pro-table@3.15.0) (2024-03-15)
### Bug Fixes
* **components:** compatible 5.13.0 border ([ddf0c82](https://github.com/ant-design/pro-components/commit/ddf0c82b5a9e55546c1b864e76972621b501769b))
* **components:** remove deprecated tip props ([85de8a2](https://github.com/ant-design/pro-components/commit/85de8a2bad41a21254719ff7f1df5328e42fd0fb))
* **DragSortTable:** demo 拖动排序后报错 ([#8158](https://github.com/ant-design/pro-components/issues/8158)) ([3920e86](https://github.com/ant-design/pro-components/commit/3920e8631191a0d1e66366abc7cdfd6dcb4a64cf))
- **components:** compatible 5.13.0 border ([ddf0c82](https://github.com/ant-design/pro-components/commit/ddf0c82b5a9e55546c1b864e76972621b501769b))
- **components:** remove deprecated tip props ([85de8a2](https://github.com/ant-design/pro-components/commit/85de8a2bad41a21254719ff7f1df5328e42fd0fb))
- **DragSortTable:** demo 拖动排序后报错 ([#8158](https://github.com/ant-design/pro-components/issues/8158)) ([3920e86](https://github.com/ant-design/pro-components/commit/3920e8631191a0d1e66366abc7cdfd6dcb4a64cf))
### Features
* **table:** add click event for icon element ([#8167](https://github.com/ant-design/pro-components/issues/8167)) ([c89d4b1](https://github.com/ant-design/pro-components/commit/c89d4b19ce9ce3bda5151cd662c86c9d0a050fce))
- **table:** add click event for icon element ([#8167](https://github.com/ant-design/pro-components/issues/8167)) ([c89d4b1](https://github.com/ant-design/pro-components/commit/c89d4b19ce9ce3bda5151cd662c86c9d0a050fce))
## [3.14.2](https://github.com/ant-design/pro-components/compare/@ant-design/pro-table@3.14.1...@ant-design/pro-table@3.14.2) (2024-01-31)
**Note:** Version bump only for package @ant-design/pro-table
## [3.14.1](https://github.com/ant-design/pro-components/compare/@ant-design/pro-table@3.14.0...@ant-design/pro-table@3.14.1) (2024-01-18)
**Note:** Version bump only for package @ant-design/pro-table

View File

@ -102,16 +102,18 @@ function getSettingItem(setting: SettingPropType) {
</Tooltip>
);
}
return <span
key={key}
onClick={() => {
if (onClick) {
onClick(key);
}
}}
>
{icon}
</span>;
return (
<span
key={key}
onClick={() => {
if (onClick) {
onClick(key);
}
}}
>
{icon}
</span>
);
}
return null;
}

View File

@ -1,19 +1,13 @@
# 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.15.5](https://github.com/ant-design/pro-components/compare/@ant-design/pro-utils@2.15.4...@ant-design/pro-utils@2.15.5) (2024-03-15)
### Bug Fixes
* **components:** compatible 5.13.0 border ([ddf0c82](https://github.com/ant-design/pro-components/commit/ddf0c82b5a9e55546c1b864e76972621b501769b))
* **components:** remove deprecated tip props ([85de8a2](https://github.com/ant-design/pro-components/commit/85de8a2bad41a21254719ff7f1df5328e42fd0fb))
- **components:** compatible 5.13.0 border ([ddf0c82](https://github.com/ant-design/pro-components/commit/ddf0c82b5a9e55546c1b864e76972621b501769b))
- **components:** remove deprecated tip props ([85de8a2](https://github.com/ant-design/pro-components/commit/85de8a2bad41a21254719ff7f1df5328e42fd0fb))
## [2.15.4](https://github.com/ant-design/pro-components/compare/@ant-design/pro-utils@2.15.3...@ant-design/pro-utils@2.15.4) (2024-01-15)

View File

@ -380,10 +380,10 @@ importers:
specifier: ^5.0.0
version: 5.3.2(react-dom@18.2.0)(react@18.2.0)
'@ant-design/pro-provider':
specifier: 2.13.5
specifier: 2.14.0
version: link:../provider
'@ant-design/pro-utils':
specifier: 2.15.4
specifier: 2.15.5
version: link:../utils
'@babel/runtime':
specifier: ^7.18.0
@ -408,34 +408,34 @@ importers:
packages/components:
dependencies:
'@ant-design/pro-card':
specifier: 2.5.29
specifier: 2.5.30
version: link:../card
'@ant-design/pro-descriptions':
specifier: 2.5.33
specifier: 2.5.34
version: link:../descriptions
'@ant-design/pro-field':
specifier: 2.14.6
specifier: 2.14.7
version: link:../field
'@ant-design/pro-form':
specifier: 2.24.4
specifier: 2.24.5
version: link:../form
'@ant-design/pro-layout':
specifier: 7.17.19
specifier: 7.17.20
version: link:../layout
'@ant-design/pro-list':
specifier: 2.5.48
specifier: 2.5.49
version: link:../list
'@ant-design/pro-provider':
specifier: 2.13.5
specifier: 2.14.0
version: link:../provider
'@ant-design/pro-skeleton':
specifier: 2.1.10
specifier: 2.1.11
version: link:../skeleton
'@ant-design/pro-table':
specifier: 3.14.2
specifier: 3.15.0
version: link:../table
'@ant-design/pro-utils':
specifier: 2.15.4
specifier: 2.15.5
version: link:../utils
'@babel/runtime':
specifier: ^7.16.3
@ -444,16 +444,16 @@ importers:
packages/descriptions:
dependencies:
'@ant-design/pro-field':
specifier: 2.14.6
specifier: 2.14.7
version: link:../field
'@ant-design/pro-form':
specifier: 2.24.4
specifier: 2.24.5
version: link:../form
'@ant-design/pro-skeleton':
specifier: 2.1.10
specifier: 2.1.11
version: link:../skeleton
'@ant-design/pro-utils':
specifier: 2.15.4
specifier: 2.15.5
version: link:../utils
'@babel/runtime':
specifier: ^7.18.0
@ -475,10 +475,10 @@ importers:
specifier: ^5.0.0
version: 5.3.2(react-dom@18.2.0)(react@18.2.0)
'@ant-design/pro-provider':
specifier: 2.13.5
specifier: 2.14.0
version: link:../provider
'@ant-design/pro-utils':
specifier: 2.15.4
specifier: 2.15.5
version: link:../utils
'@babel/runtime':
specifier: ^7.18.0
@ -524,13 +524,13 @@ importers:
specifier: ^5.0.0
version: 5.3.2(react-dom@18.2.0)(react@18.2.0)
'@ant-design/pro-field':
specifier: 2.14.6
specifier: 2.14.7
version: link:../field
'@ant-design/pro-provider':
specifier: 2.13.5
specifier: 2.14.0
version: link:../provider
'@ant-design/pro-utils':
specifier: 2.15.4
specifier: 2.15.5
version: link:../utils
'@babel/runtime':
specifier: ^7.18.0
@ -573,10 +573,10 @@ importers:
specifier: ^5.0.0
version: 5.3.2(react-dom@18.2.0)(react@18.2.0)
'@ant-design/pro-provider':
specifier: 2.13.5
specifier: 2.14.0
version: link:../provider
'@ant-design/pro-utils':
specifier: 2.15.4
specifier: 2.15.5
version: link:../utils
'@babel/runtime':
specifier: ^7.18.0
@ -622,16 +622,16 @@ importers:
specifier: ^5.0.0
version: 5.3.2(react-dom@18.2.0)(react@18.2.0)
'@ant-design/pro-card':
specifier: 2.5.29
specifier: 2.5.30
version: link:../card
'@ant-design/pro-field':
specifier: 2.14.6
specifier: 2.14.7
version: link:../field
'@ant-design/pro-table':
specifier: 3.14.2
specifier: 3.15.0
version: link:../table
'@ant-design/pro-utils':
specifier: 2.15.4
specifier: 2.15.5
version: link:../utils
'@babel/runtime':
specifier: ^7.18.0
@ -691,19 +691,19 @@ importers:
specifier: ^5.0.0
version: 5.3.2(react-dom@18.2.0)(react@18.2.0)
'@ant-design/pro-card':
specifier: 2.5.29
specifier: 2.5.30
version: link:../card
'@ant-design/pro-field':
specifier: 2.14.6
specifier: 2.14.7
version: link:../field
'@ant-design/pro-form':
specifier: 2.24.4
specifier: 2.24.5
version: link:../form
'@ant-design/pro-provider':
specifier: 2.13.5
specifier: 2.14.0
version: link:../provider
'@ant-design/pro-utils':
specifier: 2.15.4
specifier: 2.15.5
version: link:../utils
'@babel/runtime':
specifier: ^7.18.0
@ -752,7 +752,7 @@ importers:
specifier: ^5.0.0
version: 5.3.2(react-dom@18.2.0)(react@18.2.0)
'@ant-design/pro-provider':
specifier: 2.13.5
specifier: 2.14.0
version: link:../provider
'@babel/runtime':
specifier: ^7.18.0

View File

@ -1,8 +1,5 @@
import ProForm, { ProFormSegmented } from '@ant-design/pro-form';
import {
cleanup,
render,
} from '@testing-library/react';
import { cleanup, render } from '@testing-library/react';
afterEach(() => {
cleanup();
@ -25,6 +22,8 @@ describe('ProFormSegmented', () => {
</ProForm>,
);
expect(container.querySelectorAll('.ant-segmented-item').length).toBe(options.length);
expect(container.querySelectorAll('.ant-segmented-item').length).toBe(
options.length,
);
});
});

View File

@ -1,4 +1,10 @@
import { ProConfigProvider, ProForm, ProFormMoney, createIntl, useStyle } from '@ant-design/pro-components';
import {
ProConfigProvider,
ProForm,
ProFormMoney,
createIntl,
useStyle,
} from '@ant-design/pro-components';
import { cleanup, render } from '@testing-library/react';
import { ConfigProvider } from 'antd';
@ -36,19 +42,16 @@ describe('ProConfigProvider', () => {
</ConfigProvider>,
);
});
it('custom translations should be respected', () => {
const { container } = render(
<ConfigProvider
>
<ProConfigProvider intl={createIntl(
'en',
{
moneySymbol: '!?'
}
)}>
<ProForm
>
<ConfigProvider>
<ProConfigProvider
intl={createIntl('en', {
moneySymbol: '!?',
})}
>
<ProForm>
<ProFormMoney name="amount" initialValue={44.33} />
</ProForm>
</ProConfigProvider>