mirror of
https://github.com/zuiidea/antd-admin
synced 2026-11-23 06:00:24 +00:00
code style
This commit is contained in:
@@ -16,7 +16,7 @@ const enterAnim = [
|
||||
ease: 'easeOutQuad',
|
||||
onComplete: (e) => {
|
||||
e.target.style.height = 'auto'
|
||||
},
|
||||
}
|
||||
}, {
|
||||
opacity: 1,
|
||||
x: 0,
|
||||
@@ -41,19 +41,18 @@ const leaveAnim = [
|
||||
]
|
||||
|
||||
const TableBodyWrapper = ({ body, page = 1, current }) => {
|
||||
|
||||
// 切换分页去除动画;
|
||||
if(current != +page) {
|
||||
if (current !== +page) {
|
||||
return body
|
||||
}
|
||||
|
||||
return (
|
||||
<TweenOneGroup
|
||||
component="tbody"
|
||||
className={body.props.className}
|
||||
enter={enterAnim}
|
||||
leave={leaveAnim}
|
||||
appear={false}>
|
||||
component='tbody'
|
||||
className={body.props.className}
|
||||
enter={enterAnim}
|
||||
leave={leaveAnim}
|
||||
appear={false}>
|
||||
{body.props.children}
|
||||
</TweenOneGroup>
|
||||
)
|
||||
|
||||
@@ -5,7 +5,7 @@ import TableBodyWrapper from '../common/TableBodyWrapper'
|
||||
|
||||
const confirm = Modal.confirm
|
||||
|
||||
function list({
|
||||
function list ({
|
||||
loading,
|
||||
dataSource,
|
||||
pagination,
|
||||
@@ -17,7 +17,6 @@ function list({
|
||||
onStatusItem,
|
||||
location
|
||||
}) {
|
||||
|
||||
const handleMenuClick = (record, e) => {
|
||||
if (e.key === '1') {
|
||||
onEditItem(record)
|
||||
@@ -80,16 +79,16 @@ function list({
|
||||
key: 'operation',
|
||||
width: 100,
|
||||
render: (text, record) => {
|
||||
return (<Dropdown overlay={<Menu onClick={(e) => handleMenuClick(record, e)}>
|
||||
<Menu.Item key='1'>编辑</Menu.Item>
|
||||
<Menu.Item key='2'>删除</Menu.Item>
|
||||
</Menu>}>
|
||||
<Button style={{ border: 'none' }}>
|
||||
<Icon style={{ marginRight: 2 }} type='bars' />
|
||||
<Icon type='down' />
|
||||
</Button>
|
||||
</Dropdown>)
|
||||
}
|
||||
return (<Dropdown overlay={<Menu onClick={(e) => handleMenuClick(record, e)}>
|
||||
<Menu.Item key='1'>编辑</Menu.Item>
|
||||
<Menu.Item key='2'>删除</Menu.Item>
|
||||
</Menu>}>
|
||||
<Button style={{ border: 'none' }}>
|
||||
<Icon style={{ marginRight: 2 }} type='bars' />
|
||||
<Icon type='down' />
|
||||
</Button>
|
||||
</Dropdown>)
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user