Commit 16dab0df authored by 李晓静's avatar 李晓静

上传按钮样式修改

parent 420d1a4a
import React, { useEffect, useRef, useState } from 'react'; import React, { useEffect, useRef, useState } from 'react';
import { Modal, Tooltip } from 'antd'; import { Modal, Tooltip, Button, Icon } from 'antd';
import classNames from 'classnames'; import classNames from 'classnames';
import { ApolloUploadProps } from '../editInterface'; import { ApolloUploadProps } from '../editInterface';
import { antiAssign } from '../../../../utils/utils'; import { antiAssign } from '../../../../utils/utils';
...@@ -80,6 +80,7 @@ export const ApolloUpload = (props: ApolloUploadProps) => { ...@@ -80,6 +80,7 @@ export const ApolloUpload = (props: ApolloUploadProps) => {
return ( return (
<div key={i} className={s.picContainer}> <div key={i} className={s.picContainer}>
<Tooltip placement="bottom" title={item.name}> <Tooltip placement="bottom" title={item.name}>
<img <img
className={origin === 'editForm' ? classNames(s.pic, s.editForm) : s.pic} className={origin === 'editForm' ? classNames(s.pic, s.editForm) : s.pic}
src={item.thumbUrl} src={item.thumbUrl}
...@@ -90,7 +91,10 @@ export const ApolloUpload = (props: ApolloUploadProps) => { ...@@ -90,7 +91,10 @@ export const ApolloUpload = (props: ApolloUploadProps) => {
})} })}
{!disabled && origin === 'editForm' && ( {!disabled && origin === 'editForm' && (
<div className={s.add} onClick={toggleUploadDialog.bind(null, true)}> <div className={s.add} onClick={toggleUploadDialog.bind(null, true)}>
<img alt="" className={s.addIcon} src={addIcon} /> <Button>
<Icon type="upload" /> {'上传'}
</Button>
{/* <img alt="" className={s.addIcon} src={addIcon} /> */}
</div> </div>
)} )}
<Modal visible={visible} title="文件上传" onOk={onOk} onCancel={onCancel}> <Modal visible={visible} title="文件上传" onOk={onOk} onCancel={onCancel}>
......
import React, { useEffect, useRef, useState } from 'react'; import React, { useEffect, useRef, useState } from 'react';
import { message, Upload } from 'antd'; import { message, Upload, Button, Icon } from 'antd';
import moment from 'moment'; import moment from 'moment';
import s from './index.less'; import s from './index.less';
import { antiAssign, getRandom } from '../../../../utils/utils'; import { antiAssign, getRandom } from '../../../../utils/utils';
import { checkoutFileType } from './utils'; import { checkoutFileType } from './utils';
import Preview from './preview'; import Preview from './preview';
import addIcon from '../../../../assets/addIcon.png';
message.config({ message.config({
maxCount: 1, maxCount: 1,
...@@ -147,7 +146,9 @@ const UploadCom = (props) => { ...@@ -147,7 +146,9 @@ const UploadCom = (props) => {
showDownloadIcon: true, showDownloadIcon: true,
}} }}
> >
<img alt="" className={s.addIcon} src={addIcon} /> <Button>
<Icon type="upload" /> {'上传'}
</Button>
</Upload> </Upload>
<Preview ref={previewModel} /> <Preview ref={previewModel} />
</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