fix issue

pull/330/head
vapao 2021-03-29 10:55:58 +08:00
parent 73232d9e66
commit 709c696c2e
1 changed files with 4 additions and 3 deletions

View File

@ -39,10 +39,11 @@ function NavIndex(props) {
<Card <Card
title="便捷导航" title="便捷导航"
className={styles.nav} className={styles.nav}
bodyStyle={{paddingBottom: 0, minHeight: 166}}
extra={<Button type="link" onClick={() => setIsEdit(!isEdit)}>{isEdit ? '完成' : '编辑'}</Button>}> extra={<Button type="link" onClick={() => setIsEdit(!isEdit)}>{isEdit ? '完成' : '编辑'}</Button>}>
{isEdit ? ( {isEdit ? (
<Row gutter={24}> <Row gutter={24}>
<Col span={6}> <Col span={6} style={{marginBottom: 24}}>
<div <div
className={styles.add} className={styles.add}
onClick={() => setRecord({links: [{}]})}> onClick={() => setRecord({links: [{}]})}>
@ -51,7 +52,7 @@ function NavIndex(props) {
</div> </div>
</Col> </Col>
{records.map(item => ( {records.map(item => (
<Col key={item.id} span={6}> <Col key={item.id} span={6} style={{marginBottom: 24}}>
<Card actions={[ <Card actions={[
<LeftSquareOutlined onClick={() => handleSort(item, 'up')}/>, <LeftSquareOutlined onClick={() => handleSort(item, 'up')}/>,
<RightSquareOutlined onClick={() => handleSort(item, 'down')}/>, <RightSquareOutlined onClick={() => handleSort(item, 'down')}/>,
@ -68,7 +69,7 @@ function NavIndex(props) {
) : ( ) : (
<Row gutter={24}> <Row gutter={24}>
{records.map(item => ( {records.map(item => (
<Col key={item.id} span={6}> <Col key={item.id} span={6} style={{marginBottom: 24}}>
<Card actions={item.links.map(x => <span>{x.name}</span>)}> <Card actions={item.links.map(x => <span>{x.name}</span>)}>
<Card.Meta <Card.Meta
avatar={<Avatar src={item.logo}/>} avatar={<Avatar src={item.logo}/>}