mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-19 15:56:50 +08:00
Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<img class="file"
|
||||
:style="style"
|
||||
:src="{pdf,doc:word,ppt,zip,excel,xlsx:excel,xls:excel,rar,book,md,docx:word}[filePath.split('.').slice(-1)] || book"/>
|
||||
<img class="file" :style="style"
|
||||
:src="{ pdf, doc: word, ppt, zip, excel, xlsx: excel, xls: excel, rar, book, md, docx: word, png }[filePath.split('.').slice(-1)] || book" />
|
||||
</template>
|
||||
<script setup>
|
||||
import rar from '@/assets/image/file/rar.png'
|
||||
@@ -12,20 +11,20 @@ import ppt from '@/assets/image/file/ppt.png'
|
||||
import word from '@/assets/image/file/word.png'
|
||||
import zip from '@/assets/image/file/zip.png'
|
||||
import book from '@/assets/image/file/book.png'
|
||||
import {defineProps, ref} from "vue";
|
||||
import { defineProps, ref } from "vue";
|
||||
|
||||
const {modelValue = [], style} = defineProps({
|
||||
modelValue: String,
|
||||
style: {
|
||||
type: Object,
|
||||
default: {}
|
||||
}
|
||||
const { modelValue = "", style } = defineProps({
|
||||
modelValue: String,
|
||||
style: {
|
||||
type: Object,
|
||||
default: {}
|
||||
}
|
||||
})
|
||||
const filePath = ref(modelValue)
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.file {
|
||||
width: 22px;
|
||||
height: 26px;
|
||||
width: 22px;
|
||||
height: 26px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user