feat: fileicon, filetext 组件改为全局,新增一体机上传简历(接口待调)

This commit is contained in:
2025-12-24 13:53:19 +08:00
parent d0ff91a2c4
commit 212931e969
7 changed files with 596 additions and 5 deletions

View File

@@ -0,0 +1,57 @@
<template>
<view class="file-type-box">
{{ fileAbbreviation }}
</view>
</template>
<script setup>
import { computed } from 'vue';
const props = defineProps({
type: String,
});
const fileAbbreviation = computed(() => {
const typeMap = {
'application/pdf': 'PDF',
'application/msword': 'DOC',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document': 'DOCX',
'application/vnd.ms-powerpoint': 'PPT',
'application/vnd.openxmlformats-officedocument.presentationml.presentation': 'PPTX',
'application/vnd.ms-excel': 'XLS',
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': 'XLSX',
'text/markdown': 'MD',
'text/plain': 'TXT',
'text/html': 'HTML',
'pdf':'PDF',
'doc':'DOC',
'docx':'DOCX',
'ppt':'PPT',
'pptx':'PPTX',
'xls': 'XLS',
'xlsx': 'XLSX',
'md':'MD',
'txt':'TXT',
'html':'HTML',
'jpg':'JPG',
'img':'IMG',
'png':'PNG',
'jpeg':'JPEG',
'gif':'GIF',
'webp':'WEBP',
'svg':'SVG',
'tiff':'TIFF',
};
return typeMap[props.type] || 'OTHER';
});
</script>
<style scoped>
.file-type-box {
font-weight: 400;
font-size: 24rpx;
color: #7b7b7b;
line-height: 28rpx;
}
</style>