Commit 2bdb602d authored by 涂茜's avatar 涂茜

fix: update quotaselect

parent d5841ce2
Pipeline #26462 failed with stages
in 14 seconds
...@@ -50,7 +50,7 @@ const ImageSelect = ({ src, url, width, title, dataSource, onSearch, onSelect }) ...@@ -50,7 +50,7 @@ const ImageSelect = ({ src, url, width, title, dataSource, onSearch, onSelect })
const renderImageList = (data = []) => { const renderImageList = (data = []) => {
return ( return (
<Row gutter={[0, 24]}> <Row gutter={[0, 12]}>
{!!data && {!!data &&
data.map((item, index) => ( data.map((item, index) => (
<Col <Col
...@@ -93,6 +93,7 @@ const ImageSelect = ({ src, url, width, title, dataSource, onSearch, onSelect }) ...@@ -93,6 +93,7 @@ const ImageSelect = ({ src, url, width, title, dataSource, onSearch, onSelect })
</div> </div>
)} )}
</div> </div>
{visible && (
<Modal <Modal
width={width} width={width}
centered centered
...@@ -111,7 +112,7 @@ const ImageSelect = ({ src, url, width, title, dataSource, onSearch, onSelect }) ...@@ -111,7 +112,7 @@ const ImageSelect = ({ src, url, width, title, dataSource, onSearch, onSelect })
</div> </div>
} }
footer={null} footer={null}
visible={visible} visible={true}
onCancel={handleCancel} onCancel={handleCancel}
className={classNames(`${prefixCls}-modal`)} className={classNames(`${prefixCls}-modal`)}
> >
...@@ -126,6 +127,7 @@ const ImageSelect = ({ src, url, width, title, dataSource, onSearch, onSelect }) ...@@ -126,6 +127,7 @@ const ImageSelect = ({ src, url, width, title, dataSource, onSearch, onSelect })
})} })}
{!imgList.length && <Empty />} {!imgList.length && <Empty />}
</Modal> </Modal>
)}
</div> </div>
); );
}; };
......
...@@ -80,8 +80,15 @@ ...@@ -80,8 +80,15 @@
} }
&-item-wrap { &-item-wrap {
padding: 10px 0;
text-align: center; text-align: center;
border: 1px solid transparent; border: 1px solid transparent;
&.selected {
background: linear-gradient(0deg, #f1f4fb 0%, #ffffff 100%);
border: 1px solid #b8d6fb;
border-radius: 2px;
}
} }
&-item-wrap:hover { &-item-wrap:hover {
...@@ -96,12 +103,6 @@ ...@@ -96,12 +103,6 @@
height: 40px; height: 40px;
} }
&.selected {
background: linear-gradient(0deg, #f1f4fb 0%, #ffffff 100%);
border: 1px solid #b8d6fb;
border-radius: 2px;
}
&-item-text { &-item-text {
font-size: 12px; font-size: 12px;
white-space: nowrap; white-space: nowrap;
......
...@@ -221,13 +221,14 @@ const QuotaSelect = ({ ...@@ -221,13 +221,14 @@ const QuotaSelect = ({
return ( return (
<div className={classNames(prefixCls)}> <div className={classNames(prefixCls)}>
<Button {...buttonProps} onClick={showModal} /> <Button {...buttonProps} onClick={showModal} />
{visible && (
<Modal <Modal
centered centered
width={width} width={width}
title={title} title={title}
cancelText={cancelText} cancelText={cancelText}
okText={okText} okText={okText}
visible={visible} visible={true}
onCancel={handleCancel} onCancel={handleCancel}
onOk={onOk} onOk={onOk}
className={classNames(`${prefixCls}-modal`)} className={classNames(`${prefixCls}-modal`)}
...@@ -312,6 +313,7 @@ const QuotaSelect = ({ ...@@ -312,6 +313,7 @@ const QuotaSelect = ({
</div> </div>
</div> </div>
</Modal> </Modal>
)}
</div> </div>
); );
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment