Browse Source

文件大小不能超过20mb

lifanagju_citu 6 months ago
parent
commit
14bd232e1a

+ 2 - 2
src/components/Upload/file.vue

@@ -39,10 +39,10 @@ const trigger = () => {
 
 const handleUploadFile = async (e) => {
   if (!e.target.files.length) return
-
+  
   const file = e.target.files[0]
   const size = file.size
-  if (size / (1024*1024) > 10) {
+  if (size / (1024*1024) > 20) {
     Snackbar.warning(t('common.fileSizeExceed'))
     return
   }

+ 1 - 1
src/locales/en.js

@@ -25,7 +25,7 @@ export default {
     uploadPictures: 'upload pictures',
     uploadSucMsg: 'Upload successful',
     uploadErrMsg: 'Upload failed',
-    fileSizeExceed: 'The file size cannot exceed 10M',
+    fileSizeExceed: 'The file size cannot exceed 20M',
     fileFormatIncorrect: 'The uploaded file format is incorrect',
     refresh: 'Refresh',
     currentlyUnavailable: 'Currently unavailable',

+ 1 - 1
src/locales/zh-CN.js

@@ -25,7 +25,7 @@ export default {
     uploadPictures: '上传图片',
     uploadSucMsg: '上传成功',
     uploadErrMsg: '上传失败',
-    fileSizeExceed: '文件大小不能超过10M',
+    fileSizeExceed: '文件大小不能超过20M',
     fileFormatIncorrect: '上传的文件格式不正确',
     refresh: '刷新',
     currentlyUnavailable: '暂无',

+ 1 - 1
src/views/recruit/components/message/index.vue

@@ -141,7 +141,7 @@
         <File ref="uploadFile" @success="handleUploadResume"></File>
       </template>
     </CtForm>
-    <div class="color-666" style="font-size: 13px;">* 仅支持.doc, .docx, .pdf文件</div>
+    <div class="color-666" style="font-size: 13px;">* 仅支持.doc, .docx, .pdf文件且大小不能超过20MB</div>
   </CtDialog>
 
   <!-- 面试邀请 -->

+ 1 - 1
src/views/recruit/personal/PersonalCenter/resume/attachment/index.vue

@@ -39,7 +39,7 @@
         <File ref="uploadFile" @success="handleUploadResume"></File>
       </template>
     </CtForm>
-    <div class="color-666" style="font-size: 13px;">* 仅支持.doc, .docx, .pdf文件</div>
+    <div class="color-666" style="font-size: 13px;">* 仅支持.doc, .docx, .pdf文件且大小不能超过20MB</div>
   </CtDialog>
 </template>
 

+ 1 - 1
src/views/recruit/personal/position/components/details.vue

@@ -115,7 +115,7 @@
           <File ref="uploadFile" @success="handleUploadResume"></File>
         </template>
       </CtForm>
-      <div class="color-666" style="font-size: 13px;">* 仅支持.doc, .docx, .pdf文件</div>
+      <div class="color-666" style="font-size: 13px;">* 仅支持.doc, .docx, .pdf文件且大小不能超过20MB</div>
     </CtDialog>
 
     <!-- 选择简历 -->

+ 2 - 2
src/views/recruit/personal/shareJob/form/upload.vue

@@ -1,7 +1,7 @@
 <template>
   <div style="width: 100%;">
     <CtForm ref="formPageRef" :items="items"></CtForm>
-    <div class="color-666 mb-3" style="font-size: 13px;">* 仅支持.doc, .docx, .pdf文件</div>
+    <div class="color-666 mb-3" style="font-size: 13px;">* 仅支持.doc, .docx, .pdf文件且大小不能超过20MB</div>
   </div>
 </template>
 
@@ -21,7 +21,7 @@ const typeList = ['pdf', 'doc', 'docx']
 const handleUpload = async (e) => {
   const file = e
   const size = file.size
-  if (size / (1024*1024) > 10) {
+  if (size / (1024*1024) > 20) {
     Snackbar.warning(t('common.fileSizeExceed'))
     return
   }