mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-19 06:43:16 +08:00
Merge pull request #29058 from ant-design/master
This commit is contained in:
commit
bab859d50c
@ -15,6 +15,12 @@ timeline: true
|
||||
|
||||
---
|
||||
|
||||
## 4.11.2
|
||||
|
||||
`2021-01-26`
|
||||
|
||||
- 🐞 Fix rc-trigger BuildInPlacements TypeScript compile error. [#29029](https://github.com/ant-design/ant-design/pull/29029) [@waiwaiku](https://github.com/waiwaiku)
|
||||
|
||||
## 4.11.1
|
||||
|
||||
`2021-01-24`
|
||||
|
@ -15,6 +15,12 @@ timeline: true
|
||||
|
||||
---
|
||||
|
||||
## 4.11.2
|
||||
|
||||
`2021-01-26`
|
||||
|
||||
- 🐞 修复 rc-trigger BuildInPlacements TypeScript 编译错误。[#29029](https://github.com/ant-design/ant-design/pull/29029) [@waiwaiku](https://github.com/waiwaiku)
|
||||
|
||||
## 4.11.1
|
||||
|
||||
`2021-01-24`
|
||||
|
@ -18,8 +18,8 @@ Uma solução empresarial de design e biblioteca UI para React.
|
||||
|
||||
[npm-image]: http://img.shields.io/npm/v/antd.svg?style=flat-square
|
||||
[npm-url]: http://npmjs.org/package/antd
|
||||
[github-action-image]: https://github.com/ant-design/ant-design/workflows/test/badge.svg
|
||||
[github-action-url]: https://github.com/ant-design/ant-design/actions?query=workflow%3Atest
|
||||
[github-action-image]: https://github.com/ant-design/ant-design/workflows/%E2%9C%85%20test/badge.svg
|
||||
[github-action-url]: https://github.com/ant-design/ant-design/actions?query=workflow%3A%22%E2%9C%85+test%22
|
||||
[codecov-image]: https://img.shields.io/codecov/c/github/ant-design/ant-design/master.svg?style=flat-square
|
||||
[codecov-url]: https://codecov.io/gh/ant-design/ant-design/branch/master
|
||||
[david-image]: https://img.shields.io/david/ant-design/ant-design?style=flat-square
|
||||
|
@ -18,8 +18,8 @@
|
||||
|
||||
[npm-image]: http://img.shields.io/npm/v/antd.svg?style=flat-square
|
||||
[npm-url]: http://npmjs.org/package/antd
|
||||
[github-action-image]: https://github.com/ant-design/ant-design/workflows/test/badge.svg
|
||||
[github-action-url]: https://github.com/ant-design/ant-design/actions?query=workflow%3Atest
|
||||
[github-action-image]: https://github.com/ant-design/ant-design/workflows/%E2%9C%85%20test/badge.svg
|
||||
[github-action-url]: https://github.com/ant-design/ant-design/actions?query=workflow%3A%22%E2%9C%85+test%22
|
||||
[codecov-image]: https://img.shields.io/codecov/c/github/ant-design/ant-design/master.svg?style=flat-square
|
||||
[codecov-url]: https://codecov.io/gh/ant-design/ant-design/branch/master
|
||||
[david-image]: https://img.shields.io/david/ant-design/ant-design?style=flat-square
|
||||
|
@ -18,8 +18,8 @@ An enterprise-class UI design language and React UI library.
|
||||
|
||||
[npm-image]: http://img.shields.io/npm/v/antd.svg?style=flat-square
|
||||
[npm-url]: http://npmjs.org/package/antd
|
||||
[github-action-image]: https://github.com/ant-design/ant-design/workflows/test/badge.svg
|
||||
[github-action-url]: https://github.com/ant-design/ant-design/actions?query=workflow%3Atest
|
||||
[github-action-image]: https://github.com/ant-design/ant-design/workflows/%E2%9C%85%20test/badge.svg
|
||||
[github-action-url]: https://github.com/ant-design/ant-design/actions?query=workflow%3A%22%E2%9C%85+test%22
|
||||
[codecov-image]: https://img.shields.io/codecov/c/github/ant-design/ant-design/master.svg?style=flat-square
|
||||
[codecov-url]: https://codecov.io/gh/ant-design/ant-design/branch/master
|
||||
[david-image]: https://img.shields.io/david/ant-design/ant-design?style=flat-square
|
||||
|
@ -1,5 +1,5 @@
|
||||
import * as React from 'react';
|
||||
import { IconProvider } from '@ant-design/icons/lib/'; // keep last '/' since antd-tools need this
|
||||
import IconContext from '@ant-design/icons/lib/components/Context';
|
||||
import { FormProvider as RcFormProvider } from 'rc-field-form';
|
||||
import { ValidateMessages } from 'rc-field-form/lib/interface';
|
||||
import useMemo from 'rc-util/lib/hooks/useMemo';
|
||||
@ -148,6 +148,8 @@ const ProviderChildren: React.FC<ProviderChildrenProps> = props => {
|
||||
},
|
||||
);
|
||||
|
||||
const memoIconContextValue = React.useMemo(() => ({ prefixCls: iconPrefixCls }), [iconPrefixCls]);
|
||||
|
||||
let childNode = children;
|
||||
// Additional Form provider
|
||||
let validateMessages: ValidateMessages = {};
|
||||
@ -172,7 +174,9 @@ const ProviderChildren: React.FC<ProviderChildrenProps> = props => {
|
||||
}
|
||||
|
||||
if (iconPrefixCls) {
|
||||
childNode = <IconProvider value={{ prefixCls: iconPrefixCls }}>{childNode}</IconProvider>;
|
||||
childNode = (
|
||||
<IconContext.Provider value={memoIconContextValue}>{childNode}</IconContext.Provider>
|
||||
);
|
||||
}
|
||||
|
||||
if (componentSize) {
|
||||
|
@ -55,7 +55,7 @@ describe('Form', () => {
|
||||
);
|
||||
|
||||
await change(wrapper, 0, '');
|
||||
expect(wrapper.find('.ant-form-item-explain').length).toBeTruthy();
|
||||
expect(wrapper.find('.ant-form-item-with-help').length).toBeTruthy();
|
||||
expect(wrapper.find('.ant-form-item-has-error').length).toBeTruthy();
|
||||
|
||||
expect(onChange).toHaveBeenCalled();
|
||||
|
@ -1195,10 +1195,11 @@ exports[`renders ./components/input/demo/focus.md correctly 1`] = `
|
||||
>
|
||||
<div
|
||||
class="ant-space ant-space-horizontal ant-space-align-center"
|
||||
style="flex-wrap:wrap;margin-bottom:-8px"
|
||||
>
|
||||
<div
|
||||
class="ant-space-item"
|
||||
style="margin-right:8px"
|
||||
style="margin-right:8px;padding-bottom:8px"
|
||||
>
|
||||
<button
|
||||
class="ant-btn"
|
||||
@ -1211,7 +1212,7 @@ exports[`renders ./components/input/demo/focus.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
class="ant-space-item"
|
||||
style="margin-right:8px"
|
||||
style="margin-right:8px;padding-bottom:8px"
|
||||
>
|
||||
<button
|
||||
class="ant-btn"
|
||||
@ -1224,7 +1225,7 @@ exports[`renders ./components/input/demo/focus.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
class="ant-space-item"
|
||||
style="margin-right:8px"
|
||||
style="margin-right:8px;padding-bottom:8px"
|
||||
>
|
||||
<button
|
||||
class="ant-btn"
|
||||
@ -1237,7 +1238,7 @@ exports[`renders ./components/input/demo/focus.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
class="ant-space-item"
|
||||
style="margin-right:8px"
|
||||
style="margin-right:8px;padding-bottom:8px"
|
||||
>
|
||||
<button
|
||||
class="ant-btn"
|
||||
@ -1250,6 +1251,7 @@ exports[`renders ./components/input/demo/focus.md correctly 1`] = `
|
||||
</div>
|
||||
<div
|
||||
class="ant-space-item"
|
||||
style="padding-bottom:8px"
|
||||
>
|
||||
<button
|
||||
aria-checked="true"
|
||||
@ -1269,6 +1271,12 @@ exports[`renders ./components/input/demo/focus.md correctly 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-space-item"
|
||||
style="margin-bottom:8px"
|
||||
>
|
||||
<br />
|
||||
</div>
|
||||
<div
|
||||
class="ant-space-item"
|
||||
>
|
||||
|
@ -28,7 +28,7 @@ const Demo = () => {
|
||||
|
||||
return (
|
||||
<Space direction="vertical" style={{ width: '100%' }}>
|
||||
<Space>
|
||||
<Space wrap>
|
||||
<Button
|
||||
onClick={() => {
|
||||
inputRef.current!.focus({
|
||||
@ -74,7 +74,7 @@ const Demo = () => {
|
||||
}}
|
||||
/>
|
||||
</Space>
|
||||
|
||||
<br />
|
||||
{input ? <Input {...sharedProps} /> : <Input.TextArea {...sharedProps} />}
|
||||
</Space>
|
||||
);
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { placements } from 'rc-tooltip/lib/placements';
|
||||
import { BuildInPlacements } from 'rc-trigger';
|
||||
|
||||
const autoAdjustOverflowEnabled = {
|
||||
adjustX: 1,
|
||||
@ -42,7 +43,7 @@ export default function getPlacements(config: PlacementsConfig) {
|
||||
verticalArrowShift = 8,
|
||||
autoAdjustOverflow,
|
||||
} = config;
|
||||
const placementMap: typeof placements = {
|
||||
const placementMap: BuildInPlacements = {
|
||||
left: {
|
||||
points: ['cr', 'cl'],
|
||||
offset: [-4, 0],
|
||||
|
@ -37,7 +37,7 @@ Tree selection control.
|
||||
| placeholder | Placeholder of the select input | string | - | |
|
||||
| searchValue | Work with `onSearch` to make search value controlled | string | - | |
|
||||
| showArrow | Whether to show the `suffixIcon`,when single selection mode, default `true` | boolean | - | |
|
||||
| showCheckedStrategy | The way show selected item in box. **Default:** just show child nodes. **`TreeSelect.SHOW_ALL`:** show all checked treeNodes (include parent treeNode). **`TreeSelect.SHOW_PARENT`:** show checked treeNodes (just show parent treeNode) | `TreeSelect.SHOW_ALL` \| `TreeSelect.SHOW_PARENT` \| `TreeSelect.SHOW_CHILD` | `TreeSelect.SHOW_CHILD` | |
|
||||
| showCheckedStrategy | The way show selected item in box when `treeCheckable` set. **Default:** just show child nodes. **`TreeSelect.SHOW_ALL`:** show all checked treeNodes (include parent treeNode). **`TreeSelect.SHOW_PARENT`:** show checked treeNodes (just show parent treeNode) | `TreeSelect.SHOW_ALL` \| `TreeSelect.SHOW_PARENT` \| `TreeSelect.SHOW_CHILD` | `TreeSelect.SHOW_CHILD` | |
|
||||
| showSearch | Support search or not | boolean | single: false \| multiple: true | |
|
||||
| size | To set the size of the select input | `large` \| `middle` \| `small` | - | |
|
||||
| suffixIcon | The custom suffix icon,you must set `showArrow` to `true` manually in multiple selection mode | ReactNode | - | |
|
||||
|
@ -38,7 +38,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/Ax4DA0njr/TreeSelect.svg
|
||||
| placeholder | 选择框默认文字 | string | - | |
|
||||
| searchValue | 搜索框的值,可以通过 `onSearch` 获取用户输入 | string | - | |
|
||||
| showArrow | 是否显示 `suffixIcon`,单选模式下默认 `true` | boolean | - | |
|
||||
| showCheckedStrategy | 定义选中项回填的方式。`TreeSelect.SHOW_ALL`: 显示所有选中节点(包括父节点)。`TreeSelect.SHOW_PARENT`: 只显示父节点(当父节点下所有子节点都选中时)。 默认只显示子节点 | `TreeSelect.SHOW_ALL` \| `TreeSelect.SHOW_PARENT` \| `TreeSelect.SHOW_CHILD` | `TreeSelect.SHOW_CHILD` | |
|
||||
| showCheckedStrategy | 配置 `treeCheckable` 时,定义选中项回填的方式。`TreeSelect.SHOW_ALL`: 显示所有选中节点(包括父节点)。`TreeSelect.SHOW_PARENT`: 只显示父节点(当父节点下所有子节点都选中时)。 默认只显示子节点 | `TreeSelect.SHOW_ALL` \| `TreeSelect.SHOW_PARENT` \| `TreeSelect.SHOW_CHILD` | `TreeSelect.SHOW_CHILD` | |
|
||||
| showSearch | 是否支持搜索框 | boolean | 单选:false \| 多选:true | |
|
||||
| size | 选择框大小 | `large` \| `middle` \| `small` | - | |
|
||||
| suffixIcon | 自定义的选择框后缀图标, 多选模式下必须同时设置 `showArrow` 为 true | ReactNode | - | |
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "antd",
|
||||
"version": "4.11.1",
|
||||
"version": "4.11.2",
|
||||
"description": "An enterprise-class UI design language and React components implementation",
|
||||
"title": "Ant Design",
|
||||
"keywords": [
|
||||
@ -52,6 +52,7 @@
|
||||
"bundlesize": "bundlesize",
|
||||
"check-commit": "node ./scripts/check-commit",
|
||||
"check-ts-demo": "node ./scripts/check-ts-demo",
|
||||
"clean": "antd-tools run clean && rm -rf es lib coverage dist report.html",
|
||||
"prestart": "npm run version",
|
||||
"precompile": "npm run version",
|
||||
"pretest": "npm run version",
|
||||
@ -145,6 +146,7 @@
|
||||
"rc-tooltip": "~5.0.0",
|
||||
"rc-tree": "~4.1.0",
|
||||
"rc-tree-select": "~4.3.0",
|
||||
"rc-trigger": "^5.2.1",
|
||||
"rc-upload": "~3.3.4",
|
||||
"rc-util": "^5.7.0",
|
||||
"scroll-into-view-if-needed": "^2.2.25",
|
||||
@ -153,7 +155,7 @@
|
||||
"devDependencies": {
|
||||
"@ant-design/bisheng-plugin": "^2.3.0",
|
||||
"@ant-design/hitu": "^0.0.0-alpha.13",
|
||||
"@ant-design/tools": "^13.3.1",
|
||||
"@ant-design/tools": "^13.3.3",
|
||||
"@qixian.cs/github-contributors-list": "^1.0.3",
|
||||
"@stackblitz/sdk": "^1.3.0",
|
||||
"@types/classnames": "^2.2.8",
|
||||
@ -240,7 +242,6 @@
|
||||
"rc-footer": "^0.6.3",
|
||||
"rc-queue-anim": "^1.6.12",
|
||||
"rc-scroll-anim": "^2.5.8",
|
||||
"rc-trigger": "^5.1.2",
|
||||
"rc-tween-one": "^2.4.1",
|
||||
"rc-virtual-list": "^3.2.4",
|
||||
"react": "^17.0.1",
|
||||
|
@ -1,5 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "[CLEAN] clean"
|
||||
npm run clean
|
||||
|
||||
echo "[TEST ALL] check-commit"
|
||||
npm run check-commit
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user