培训文件限制只能上传pdf
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
b644098203
commit
233bcbb1d0
|
@ -12,7 +12,7 @@
|
|||
<!-- 文件 -->
|
||||
<el-form-item :label="$t('trials:attachment:form:file')">
|
||||
<div class="upload-container">
|
||||
<el-upload class="upload-demo" action accept=".pdf,.mp4" :before-upload="beforeUpload"
|
||||
<el-upload class="upload-demo" action accept=".pdf" :before-upload="beforeUpload"
|
||||
:http-request="handleUploadFile" :on-remove="handleRemoveFile" :show-file-list="true" :file-list="fileList"
|
||||
:limit="1" :on-exceed="handleExceed" :disabled="form.FileTypeId === ''">
|
||||
<el-button size="small" type="primary" :disabled="form.FileTypeId === '' || saveBtnLoading"
|
||||
|
@ -218,7 +218,7 @@ export default {
|
|||
},
|
||||
// 文件类型是否是pdf
|
||||
checkFileSuffix(fileName) {
|
||||
var typeArr = ['pdf', 'mp4']
|
||||
var typeArr = ['pdf']
|
||||
var extendName = fileName.substring(fileName.lastIndexOf('.') + 1).toLocaleLowerCase()
|
||||
if (typeArr.indexOf(extendName) !== -1) {
|
||||
return true
|
||||
|
|
Loading…
Reference in New Issue