顾绍勇 hace 5 años
padre
commit
be414f2bee

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

@@ -192,10 +192,19 @@ const header = props => {
192 192
         });
193 193
     }
194 194
 
195
-    const beforeUpload = file  =>{
195
+    function beforeUpload(file) {
196 196
         console.log("开始上传")
197 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 209
     return (
201 210
         <>

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

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

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

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