diff --git a/components/descriptions/index.tsx b/components/descriptions/index.tsx index 87cb0d2a0a..0351a0bfa2 100644 --- a/components/descriptions/index.tsx +++ b/components/descriptions/index.tsx @@ -10,12 +10,13 @@ import { ConfigConsumer, ConfigConsumerProps } from '../config-provider'; export interface DescriptionsItemProps { prefixCls?: string; - label: React.ReactNode; - children: JSX.Element; + label?: React.ReactNode; + children: React.ReactNode; span?: number; } -const DescriptionsItem: React.SFC = ({ children }) => children; +const DescriptionsItem: React.SFC = ({ children }) => + children as JSX.Element; export interface DescriptionsProps { prefixCls?: string; diff --git a/components/descriptions/style/index.less b/components/descriptions/style/index.less index fcc29e539b..0d20ce55f2 100644 --- a/components/descriptions/style/index.less +++ b/components/descriptions/style/index.less @@ -22,6 +22,7 @@ border-radius: @border-radius-base; table { width: 100%; + table-layout: fixed; } } @@ -90,6 +91,9 @@ &.bordered { .@{descriptions-prefix-cls}-view { border: 1px solid @border-color-split; + > table { + table-layout: auto; + } } .@{descriptions-prefix-cls}-item-label, .@{descriptions-prefix-cls}-item-content {