Commit 63de7cfa authored by 张子雨's avatar 张子雨

feat: 增加图片限制

parent ce45ac19
This diff is collapsed.
...@@ -159,13 +159,13 @@ class PicturesWall extends React.Component { ...@@ -159,13 +159,13 @@ class PicturesWall extends React.Component {
const { max, isDisabled } = this.props; const { max, isDisabled } = this.props;
const that = this; const that = this;
const uploadProps = { const uploadProps = {
accept: '.jpg,.png,.jpeg',
beforeUpload: lodash.debounce(async (file, files) => { beforeUpload: lodash.debounce(async (file, files) => {
const optionsArray = await CheckImageInfoList(files); const optionsArray = await CheckImageInfoList(files);
const onRightImgList = await isUploadNext(optionsArray, that.props.id); const onRightImgList = await isUploadNext(optionsArray, that.props.id);
if (!onRightImgList.length) { if (!onRightImgList.length) {
return; return;
} }
console.log('校验通过的队列=======>', onRightImgList);
this.setState( this.setState(
state => ({ state => ({
newFile: [...state.newFile, ...onRightImgList], newFile: [...state.newFile, ...onRightImgList],
......
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