李志伟 2 years ago
parent
commit
6bc76899ac

+ 2
- 1
src/components/Upload/UploadImage.jsx View File

@@ -1,9 +1,10 @@
1 1
 import React, { useState } from 'react';
2 2
 import { LoadingOutlined, PlusOutlined } from '@ant-design/icons';
3
+import { message } from 'antd';
3 4
 import Upload from './Upload';
4 5
 
5 6
 function beforeUpload(file) {
6
-  const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png'||file.type==='image/gif';
7
+  const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/gif';
7 8
   if (!isJpgOrPng) {
8 9
     message.error('请上传 JPG , PNG或GIF 图片!');
9 10
   }

+ 1
- 0
src/pages/Machinery/Machinery/Edit/components/BasicInfo.jsx View File

@@ -1,6 +1,7 @@
1 1
 import React, { useState, useEffect } from 'react';
2 2
 import { history } from 'umi';
3 3
 import { Form, Input, DatePicker, Select, Button, message } from 'antd';
4
+import moment from 'moment';
4 5
 import ExtendContent from '@/components/ExtendContent';
5 6
 import { UploadImage, UploadImageList } from '@/components/Upload';
6 7
 import Money from '@/components/Money';