Commit c1601ee7 authored by zhangwenshuai's avatar zhangwenshuai

update apolloTable upload

parent 8f76c90a
...@@ -42,6 +42,15 @@ ...@@ -42,6 +42,15 @@
} }
} }
} }
.popContainer{
width: 200px;
:global(.ant-popover-inner-content){
padding: 0;
}
.popContent{
padding: @paddingGen;
}
}
.popItem { .popItem {
border-radius: @borderRadius; border-radius: @borderRadius;
margin-bottom: @marginSm; margin-bottom: @marginSm;
...@@ -54,6 +63,5 @@ ...@@ -54,6 +63,5 @@
padding: 5px 10px; padding: 5px 10px;
line-height: 1; line-height: 1;
font-size: 14px; font-size: 14px;
color: #2e67c5;
} }
} }
...@@ -56,10 +56,18 @@ export const Tags = (props: any) => { ...@@ -56,10 +56,18 @@ export const Tags = (props: any) => {
{dotVisible && ( {dotVisible && (
<Popover <Popover
trigger="click" trigger="click"
onClick={(e) => {
e.stopPropagation();
}}
placement="left" placement="left"
overlayStyle={{ width: '200px' }} overlayClassName={s.popContainer}
content={ content={
<div> <div
className={s.popContent}
onClick={(e) => {
e.stopPropagation();
}}
>
{value.map((item, index) => { {value.map((item, index) => {
let color = ''; let color = '';
if (options && Array.isArray(options) && options.length > 0) { if (options && Array.isArray(options) && options.length > 0) {
......
...@@ -21,7 +21,8 @@ export const ApolloUploadDetail = (props: UploadProps) => { ...@@ -21,7 +21,8 @@ export const ApolloUploadDetail = (props: UploadProps) => {
}; };
}); });
} }
const onPreview = (item) => { const onPreview = (item, e) => {
e.stopPropagation();
if (previewModel && previewModel.current && previewModel.current.onPreview) { if (previewModel && previewModel.current && previewModel.current.onPreview) {
previewModel.current.onPreview(item.value, item.name); previewModel.current.onPreview(item.value, item.name);
} }
......
...@@ -20,4 +20,6 @@ ...@@ -20,4 +20,6 @@
.img { .img {
cursor: pointer; cursor: pointer;
width: 30px;
max-height: 30px;
} }
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
overflow: hidden; overflow: hidden;
display: flex; display: flex;
align-items: center; align-items: center;
border: 1px solid @primaryColor;
.add { .add {
cursor: pointer; cursor: pointer;
font-size: @textFontGen; font-size: @textFontGen;
......
...@@ -71,7 +71,7 @@ export const ApolloUpload = (props: ApolloUploadProps) => { ...@@ -71,7 +71,7 @@ export const ApolloUpload = (props: ApolloUploadProps) => {
})} })}
<Modal visible={visible} title="文件上传" onOk={onOk} onCancel={onCancel}> <Modal visible={visible} title="文件上传" onOk={onOk} onCancel={onCancel}>
<div className={s.uploadContainer}> <div className={s.uploadContainer}>
<Upload {...selfProps} value={value} onChange={changeValue} /> <Upload {...selfProps} value={props.value} onChange={changeValue} />
</div> </div>
</Modal> </Modal>
</div> </div>
......
...@@ -24,7 +24,8 @@ export default class uploadDetail extends React.Component { ...@@ -24,7 +24,8 @@ export default class uploadDetail extends React.Component {
} }
}; };
handleCancel = () => { handleCancel = (e) => {
e.stopPropagation();
this.setState({ showDialog: false }); this.setState({ showDialog: false });
}; };
......
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