fix : 统一文件类型
This commit is contained in:
@@ -3,7 +3,9 @@
|
|||||||
<image
|
<image
|
||||||
v-else-if="
|
v-else-if="
|
||||||
type === 'application/msword' ||
|
type === 'application/msword' ||
|
||||||
type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' ||
|
||||||
|
type === 'doc' ||
|
||||||
|
type === 'docx'
|
||||||
"
|
"
|
||||||
:src="docIcon"
|
:src="docIcon"
|
||||||
class="file-icon"
|
class="file-icon"
|
||||||
@@ -18,9 +20,9 @@
|
|||||||
:src="pptIcon"
|
:src="pptIcon"
|
||||||
class="file-icon"
|
class="file-icon"
|
||||||
/>
|
/>
|
||||||
<image v-else-if="type === 'text/markdown'" :src="mdIcon" class="file-icon" />
|
<image v-else-if="type === 'text/markdown' || type === 'md'" :src="mdIcon" class="file-icon" />
|
||||||
<image v-else-if="type === 'text/plain'" :src="txtIcon" class="file-icon" />
|
<image v-else-if="type === 'text/plain' || type=== 'txt'" :src="txtIcon" class="file-icon" />
|
||||||
<image v-else-if="type === 'text/html'" :src="htmlIcon" class="file-icon" />
|
<image v-else-if="type === 'text/html' || type === 'html'" :src="htmlIcon" class="file-icon" />
|
||||||
<image
|
<image
|
||||||
v-else-if="
|
v-else-if="
|
||||||
type === 'application/vnd.ms-excel' ||
|
type === 'application/vnd.ms-excel' ||
|
||||||
|
|||||||
@@ -23,11 +23,16 @@ const fileAbbreviation = computed(() => {
|
|||||||
'text/markdown': 'MD',
|
'text/markdown': 'MD',
|
||||||
'text/plain': 'TXT',
|
'text/plain': 'TXT',
|
||||||
'text/html': 'HTML',
|
'text/html': 'HTML',
|
||||||
'xls': 'XLS',
|
|
||||||
'xlsx': 'XLSX',
|
|
||||||
'pdf':'PDF',
|
'pdf':'PDF',
|
||||||
|
'doc':'DOC',
|
||||||
|
'docx':'DOCX',
|
||||||
'ppt':'PPT',
|
'ppt':'PPT',
|
||||||
'pptx':'PPTX',
|
'pptx':'PPTX',
|
||||||
|
'xls': 'XLS',
|
||||||
|
'xlsx': 'XLSX',
|
||||||
|
'md':'MD',
|
||||||
|
'txt':'TXT',
|
||||||
|
'html':'HTML'
|
||||||
};
|
};
|
||||||
return typeMap[props.type] || 'OTHER';
|
return typeMap[props.type] || 'OTHER';
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -537,7 +537,7 @@
|
|||||||
id="fileInput"
|
id="fileInput"
|
||||||
class="file-input"
|
class="file-input"
|
||||||
multiple
|
multiple
|
||||||
accept="image/*,.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt"
|
accept="image/*,.pdf,.doc,.docx,.xls,.xlsx,.csv,.ppt,.pptx,.txt,.md,.html"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user