This commit is contained in:
2026-10-08 18:36:23 +08:00
commit 8a1da677e4
904 changed files with 111327 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
<template>
<view>
<template v-if="['doc', 'docx'].includes(item.split('.').pop())">
<file-word @click="openDownload" theme="outline" class="pointer" size="40" fill="#4a90e2" strokeLinecap="square"/>
</template>
<template v-else-if="['xls', 'xlsx'].includes(item.split('.').pop())">
<file-excel @click="openDownload" theme="outline" class="pointer" size="40" fill="#417505" strokeLinecap="square"/>
</template>
<template v-else-if="['pdf'].includes(item.split('.').pop())">
<file-pdf-one @click="openDownload" theme="outline" class="pointer" size="40" fill="#f5a623"
strokeLinecap="square"/>
</template>
<template v-else>
<el-image :src="item" style="width: 100px; height: 100px" fit="cover"
:preview-src-list="[item]"/>
</template>
</view>
</template>
<script>
import {FileExcel, FilePdfOne, FileWord} from "@icon-park/vue";
export default {
name: "file-type",
components: {FilePdfOne, FileExcel, FileWord},
props: {
item: {
type: String,
default: ''
}
},
data() {
return {}
},
methods: {
openDownload() {
window.location.href = this.item
},
},
}
</script>