bug修复

This commit is contained in:
cwchen 2024-11-21 17:55:32 +08:00
parent 20a302f652
commit 2a9fb49b32
1 changed files with 4 additions and 4 deletions

View File

@ -112,12 +112,12 @@ function getInputDetailList() {
// 设置文件类型
function handleFileType(index, file, result) {
let html = '', img = '';
if (file.ext === 'doc' || file.ext === 'docx') {
if (file.ext === 'doc' || file.ext === 'docx' || file.name.indexOf('doc') > -1 || file.name.indexOf('docx') > -1) {
img = '../../../images/docx.png';
} else if (file.ext === 'xls' || file.ext === 'xlsx') {
} else if (file.ext === 'xls' || file.ext === 'xlsx' || file.name.indexOf('xls') > -1 || file.name.indexOf('xlsx') > -1) {
img = '../../../images/xlsx.png';
} else if (file.ext === 'pdf') {
img = '../../../images/PDF.png';
} else if (file.ext === 'pdf' || file.name.indexOf('pdf') > -1) {
img = '../../../images/pdf.png';
} else {
return '<img class="img" style="width: 130px;height: 120px;" isOld="' + file.id + '" data-index=' + index + ' data-name=' + file.name + ' src=' + result + '>';
}