diff --git a/components/pagination/Pagination.jsx b/components/pagination/Pagination.jsx
index 5fde3fd08..d841589ce 100644
--- a/components/pagination/Pagination.jsx
+++ b/components/pagination/Pagination.jsx
@@ -4,6 +4,7 @@ import MiniSelect from './MiniSelect';
import LocaleReceiver from '../locale-provider/LocaleReceiver';
import { getOptionProps } from '../_util/props-util';
import VcPagination from '../vc-pagination';
+import enUS from '../pagination/locale/en_US';
import Icon from '../icon';
import { ConfigConsumerProps } from '../config-provider';
@@ -44,7 +45,7 @@ export default {
...PaginationProps(),
},
inject: {
- configProvider: { default: () => ({}) },
+ configProvider: { default: () => ConfigConsumerProps },
},
methods: {
getIconsProps(prefixCls) {
@@ -118,7 +119,7 @@ export default {
},
render() {
return (
-
+
);
},
};
diff --git a/components/popconfirm/index.jsx b/components/popconfirm/index.jsx
index 8a48b0ff0..c0bf74934 100644
--- a/components/popconfirm/index.jsx
+++ b/components/popconfirm/index.jsx
@@ -41,7 +41,7 @@ const Popconfirm = {
},
},
inject: {
- configProvider: { default: () => ({}) },
+ configProvider: { default: () => ConfigConsumerProps },
},
data() {
const props = getOptionProps(this);
diff --git a/components/popover/index.jsx b/components/popover/index.jsx
index 7231597ce..9ddca4365 100644
--- a/components/popover/index.jsx
+++ b/components/popover/index.jsx
@@ -10,7 +10,7 @@ const Popover = {
name: 'APopover',
props: {
...props,
- prefixCls: PropTypes.string.def('ant-popover'),
+ prefixCls: PropTypes.string,
transitionName: PropTypes.string.def('zoom-big'),
content: PropTypes.any,
title: PropTypes.any,
@@ -20,7 +20,7 @@ const Popover = {
event: 'visibleChange',
},
inject: {
- configProvider: { default: () => ({}) },
+ configProvider: { default: () => ConfigConsumerProps },
},
methods: {
getPopupDomNode() {
diff --git a/components/tree-select/index.en-US.md b/components/tree-select/index.en-US.md
index 02dfaf64a..6e985b787 100644
--- a/components/tree-select/index.en-US.md
+++ b/components/tree-select/index.en-US.md
@@ -26,8 +26,8 @@
| suffixIcon | The custom suffix icon | VNode \| slot | - |
| treeCheckable | Whether to show checkbox on the treeNodes | boolean | false |
| treeCheckStrictly | Whether to check nodes precisely (in the `checkable` mode), means parent and child nodes are not associated, and it will make `labelInValue` be true | boolean | false |
-| treeData | Data of the treeNodes, manual construction work is no longer needed if this property has been set(ensure the Uniqueness of each value) | array<{ value, label, children, [disabled, disableCheckbox, selectable] }> | \[] |
-| treeDataSimpleMode | Enable simple mode of treeData.(treeData should like this: [{id:1, pId:0, value:'1', label:"test1",...},...], pId is parent node's id) | false\|Array<{ id: string, pId: string, rootPId: null }> | false |
+| treeData | Data of the treeNodes, manual construction work is no longer needed if this property has been set(ensure the Uniqueness of each value) | array\<{ value, title, children, \[disabled, disableCheckbox, selectable] }> | \[] |
+| treeDataSimpleMode | Enable simple mode of treeData. Changes the `treeData` schema to: \[{id:1, pId:0, value:'1', title:"test1",...},...] where pId is parent node's id). It is possible to replace the default `id` and `pId` keys by providing object to `treeDataSimpleMode` | false\|object\<{ id: string, pId: string, rootPId: null }> | false |
| treeDefaultExpandAll | Whether to expand all treeNodes by default | boolean | false |
| treeDefaultExpandedKeys | Default expanded treeNodes | string\[] \| number\[] | - |
| treeExpandedKeys(.sync) | Set expanded keys | string\[] \| number\[] | - |
diff --git a/components/tree-select/index.jsx b/components/tree-select/index.jsx
index c8f8c09a4..4d92f9ba4 100644
--- a/components/tree-select/index.jsx
+++ b/components/tree-select/index.jsx
@@ -33,7 +33,7 @@ const TreeSelect = {
event: 'change',
},
inject: {
- configProvider: { default: () => ({}) },
+ configProvider: { default: () => ConfigConsumerProps },
},
created() {
warning(
@@ -99,9 +99,7 @@ const TreeSelect = {
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
const prefixCls = getPrefixCls('select', customizePrefixCls);
- const renderEmpty =
- (this.configProvider.renderEmpty && this.configProvider.renderEmpty()) ||
- ConfigConsumerProps.renderEmpty;
+ const renderEmpty = this.configProvider.renderEmpty;
const notFoundContent = getComponentFromProp(this, 'notFoundContent');
const { getPopupContainer: getContextPopupContainer } = this.configProvider;
const rest = omit(restProps, [
diff --git a/components/tree-select/index.zh-CN.md b/components/tree-select/index.zh-CN.md
index f045b808c..0eb2e4367 100644
--- a/components/tree-select/index.zh-CN.md
+++ b/components/tree-select/index.zh-CN.md
@@ -27,7 +27,7 @@
| treeCheckable | 显示 checkbox | boolean | false |
| treeCheckStrictly | checkable 状态下节点选择完全受控(父子节点选中状态不再关联),会使得 `labelInValue` 强制为 true | boolean | false |
| treeData | treeNodes 数据,如果设置则不需要手动构造 TreeNode 节点(value 在整个树范围内唯一) | array<{value, label, children, [disabled, disableCheckbox, selectable]}> | \[] |
-| treeDataSimpleMode | 使用简单格式的 treeData,具体设置参考可设置的类型 (此时 treeData 应变为这样的数据结构: [{id:1, pId:0, value:'1', label:"test1",...},...], `pId` 是父节点的 id) | false\|Array<{ id: string, pId: string, rootPId: null }> | false |
+| treeDataSimpleMode | 使用简单格式的 treeData,具体设置参考可设置的类型 (此时 treeData 应变为这样的数据结构: \[{id:1, pId:0, value:'1', label:"test1",...},...], `pId` 是父节点的 id) | false\|Array<{ id: string, pId: string, rootPId: null }> | false |
| treeDefaultExpandAll | 默认展开所有树节点 | boolean | false |
| treeDefaultExpandedKeys | 默认展开的树节点 | string\[] \| number\[] | - |
| treeExpandedKeys(.sync) | 设置展开的树节点 | string\[] \| number\[] | - |
diff --git a/types/tree-select.d.ts b/types/tree-select.d.ts
index c274b4383..e31787878 100644
--- a/types/tree-select.d.ts
+++ b/types/tree-select.d.ts
@@ -18,6 +18,10 @@ export interface TreeData {
export declare class TreeSelect extends AntdComponent {
static TreeNode: typeof TreeNode;
+ treeIcon?: boolean;
+
+ notFoundContent?: any;
+
/**
* Whether allow clear
* @default false