顾绍勇 5 anos atrás
pai
commit
be414f2bee

+ 11
- 2
src/pages/contact/contact/add.jsx Ver arquivo

192
         });
192
         });
193
     }
193
     }
194
 
194
 
195
-    const beforeUpload = file  =>{
195
+    function beforeUpload(file) {
196
         console.log("开始上传")
196
         console.log("开始上传")
197
         console.log(file)
197
         console.log(file)
198
-    }
198
+        const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
199
+        if (!isJpgOrPng) {
200
+          message.error('请上传jpg格式的图片');
201
+        }
202
+        const isLt2M = file.size / 1024 / 1024 < 2;
203
+        if (!isLt2M) {
204
+          message.error('Image must smaller than 2MB!');
205
+        }
206
+        return isJpgOrPng && isLt2M;
207
+      }
199
 
208
 
200
     return (
209
     return (
201
         <>
210
         <>

+ 1
- 1
src/pages/contact/contact/list.jsx Ver arquivo

58
 
58
 
59
     const toDel = rowData => () => {
59
     const toDel = rowData => () => {
60
         if (contactList.length < 1) {
60
         if (contactList.length < 1) {
61
-            openNotificationWithIcon('error', '请先选择需要删除的联系人')
61
+            message.info('请至少选择一条数据')
62
             return
62
             return
63
         }
63
         }
64
 
64
 

+ 1
- 1
src/pages/resource/openScreen/index.jsx Ver arquivo

174
                     </Form.Item>
174
                     </Form.Item>
175
 
175
 
176
                     <Form.Item>
176
                     <Form.Item>
177
-                        {getFieldDecorator('priceLesser')(
177
+                        {getFieldDecorator('targetName')(
178
                             <Input
178
                             <Input
179
                                 prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
179
                                 prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
180
                                 placeholder="关联业务"
180
                                 placeholder="关联业务"