fix prefixCls of empty go to div (#14404)

close #14403
This commit is contained in:
zombieJ 2019-01-17 22:32:52 +08:00 committed by GitHub
parent 1e7b3de159
commit 7ed045ce57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,8 +19,15 @@ export interface EmptyProps {
const Empty: React.SFC<EmptyProps> = (props: EmptyProps) => (
<ConfigConsumer>
{({ getPrefixCls }: ConfigConsumerProps) => {
const { className, image, description, children, ...restProps } = props;
const prefixCls = getPrefixCls('empty', props.prefixCls);
const {
className,
prefixCls: customizePrefixCls,
image,
description,
children,
...restProps
} = props;
const prefixCls = getPrefixCls('empty', customizePrefixCls);
return (
<LocaleReceiver componentName="Empty">