mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-04 21:08:55 +08:00
fix: Tabs、table2 warning 问题修复 (#6072)
* fix: Tabs warning 问题修复 * fix: table2 warning 问题修复
This commit is contained in:
parent
74796dd258
commit
c6675b1bc7
@ -244,9 +244,8 @@ export class Tabs extends React.Component<TabsProps, any> {
|
|||||||
activeKey: this.props.activeKey,
|
activeKey: this.props.activeKey,
|
||||||
children: Array.isArray(this.props.children)
|
children: Array.isArray(this.props.children)
|
||||||
? this.props.children!.map(item => ({
|
? this.props.children!.map(item => ({
|
||||||
key: item?.props.key,
|
eventKey: item?.props?.eventKey,
|
||||||
eventKey: item?.props.eventKey,
|
title: item?.props?.title
|
||||||
label: item?.props.label
|
|
||||||
}))
|
}))
|
||||||
: this.props.children
|
: this.props.children
|
||||||
},
|
},
|
||||||
@ -254,9 +253,8 @@ export class Tabs extends React.Component<TabsProps, any> {
|
|||||||
activeKey: preProps.activeKey,
|
activeKey: preProps.activeKey,
|
||||||
children: Array.isArray(preProps.children)
|
children: Array.isArray(preProps.children)
|
||||||
? preProps.children!.map((item: any) => ({
|
? preProps.children!.map((item: any) => ({
|
||||||
key: item?.props.key,
|
eventKey: item?.props?.eventKey,
|
||||||
eventKey: item?.props.eventKey,
|
title: item?.props?.title
|
||||||
label: item?.props.label
|
|
||||||
}))
|
}))
|
||||||
: preProps.children
|
: preProps.children
|
||||||
}
|
}
|
||||||
|
@ -1050,7 +1050,7 @@ export class Table extends React.PureComponent<TableProps, TableState> {
|
|||||||
<HeadCellSort
|
<HeadCellSort
|
||||||
column={item}
|
column={item}
|
||||||
active={
|
active={
|
||||||
this.state.sort?.orderBy &&
|
!!this.state.sort?.orderBy &&
|
||||||
this.state.sort.orderBy === item?.name
|
this.state.sort.orderBy === item?.name
|
||||||
}
|
}
|
||||||
onSort={(payload: SortProps) => {
|
onSort={(payload: SortProps) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user