mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-04 00:49:39 +08:00
perf: layout add default value (#50797)
This commit is contained in:
parent
01d1b3d492
commit
ef1b0e32ab
@ -22,7 +22,7 @@ const Splitter: React.FC<React.PropsWithChildren<SplitterProps>> = (props) => {
|
||||
prefixCls: customizePrefixCls,
|
||||
className,
|
||||
style,
|
||||
layout,
|
||||
layout = 'horizontal',
|
||||
children,
|
||||
rootClassName,
|
||||
onResizeStart,
|
||||
@ -117,9 +117,8 @@ const Splitter: React.FC<React.PropsWithChildren<SplitterProps>> = (props) => {
|
||||
const containerClassName = classNames(
|
||||
prefixCls,
|
||||
className,
|
||||
`${prefixCls}-${layout}`,
|
||||
{
|
||||
[`${prefixCls}-horizontal`]: !isVertical,
|
||||
[`${prefixCls}-vertical`]: isVertical,
|
||||
[`${prefixCls}-rtl`]: isRTL,
|
||||
},
|
||||
rootClassName,
|
||||
|
@ -44,6 +44,7 @@ Common props ref:[Common props](/docs/react/common-props)
|
||||
|
||||
| Property | Description | Type | Default | Version |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| defaultSize | Initial panel size support number for px or 'percent%' usage | `number \| string` | - | - |
|
||||
| min | Minimum threshold support number for px or 'percent%' usage | `number \| string` | - | - |
|
||||
| max | Maximum threshold support number for px or 'percent%' usage | `number \| string` | - | - |
|
||||
| size | Controlled panel size support number for px or 'percent%' usage | `number \| string` | - | - |
|
||||
|
@ -45,6 +45,7 @@ tag: 5.21.0
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| defaultSize | 初始面板大小,支持数字 px 或者文字 '百分比%' 类型 | `number \| string` | - | - |
|
||||
| min | 最小阈值,支持数字 px 或者文字 '百分比%' 类型 | `number \| string` | - | - |
|
||||
| max | 最大阈值,支持数字 px 或者文字 '百分比%' 类型 | `number \| string` | - | - |
|
||||
| size | 受控面板大小,支持数字 px 或者文字 '百分比%' 类型 | `number \| string` | - | - |
|
||||
|
Loading…
Reference in New Issue
Block a user