update 大量细节处理

This commit is contained in:
2021-06-17 18:07:33 +08:00
parent 5b57785b81
commit d3385102f2
12 changed files with 424 additions and 393 deletions

View File

@@ -1,29 +1,29 @@
import React, { Component } from 'react'
import { Divider } from 'antd'
function renderActions() {
const { children } = this.props
const actions = []
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
}
export default class QueryTableActions extends Component {
renderActions() {
const { children } = this.props
const actions = []
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
}
render() {
return (
<div className="yo-table-actions">
<div className="yo-table-actions--inner">
{this.renderActions()}
{renderActions.call(this)}
</div>
</div>
)