fix 修复问题
This commit is contained in:
@@ -7,12 +7,14 @@ export default class QueryTableActions extends Component {
|
||||
const { children } = this.props
|
||||
const actions = []
|
||||
|
||||
Array.isArray(children) ? children.forEach((action, i) => {
|
||||
actions.push(action)
|
||||
if (i < this.props.children.length - 1) {
|
||||
actions.push(<Divider type="vertical" key={i} />)
|
||||
}
|
||||
}) : (actions.push(children))
|
||||
Array.isArray(children) ? children
|
||||
.filter(action => action)
|
||||
.forEach((action, i) => {
|
||||
actions.push(action)
|
||||
if (i < this.props.children.length - 1) {
|
||||
actions.push(<Divider type="vertical" key={i} />)
|
||||
}
|
||||
}) : (actions.push(children))
|
||||
|
||||
return actions
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user