问题修复

This commit is contained in:
hongchao 2025-11-20 17:06:12 +08:00
parent 1a5cbe0951
commit b5938e42bb
1 changed files with 3 additions and 3 deletions

View File

@ -162,7 +162,7 @@
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip" slot="tip" style="color: red;">只能上传.xlsx文件</div>
<div class="el-upload__tip" slot="tip" style="color: red;">只能上传.xls.xlsx文件</div>
</el-upload>
</template>
</el-dialog>
@ -674,8 +674,8 @@ export default {
},
beforeUpload(file) {
const fileType = file.name.split('.').pop().toLowerCase();
if (fileType!== 'xlsx') {
this.$message.error('只能上传 Excel 文件(.xlsx');
if (fileType!== 'xls' && fileType!== 'xlsx') {
this.$message.error('只能上传 Excel 文件(.xls 或 .xlsx');
return false;
}
return true;