更換favicon | 上傳新增檔案 ppt、zip、rar
This commit is contained in:
parent
96fe7e279b
commit
eb60d1ed7d
Binary file not shown.
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 4.2 KiB |
@ -9,7 +9,7 @@ const props = defineProps({
|
||||
getFileList: Function,
|
||||
multiple: Boolean,
|
||||
baseUrl: String,
|
||||
formats: { type: String, default: "txt、doc、xls、pdf、png、jpg" }
|
||||
formats: { type: String, default: "txt、doc、xls、pdf、png、jpg、ppt、zip、rar" },
|
||||
});
|
||||
|
||||
const acceptFileType = [
|
||||
@ -26,6 +26,13 @@ const acceptFileType = [
|
||||
"application/msword",
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
||||
"application/vnd.ms-powerpoint",
|
||||
".ppt",
|
||||
".pptx",
|
||||
".zip",
|
||||
".rar",
|
||||
"application/vnd.openxmlformats-officedocument.presentationml.presentation", // PowerPoint Files 2007+
|
||||
"application/zip", // ZIP Files
|
||||
"application/x-rar-compressed", // RAR Files
|
||||
];
|
||||
|
||||
const loading = ref(false);
|
||||
@ -237,6 +244,14 @@ const revokeURL = (src) => {
|
||||
:icon="['fas', 'file-powerpoint']"
|
||||
/>
|
||||
</template>
|
||||
<template
|
||||
v-else-if="file.type?.match(/zip|rar/g) || file.ext?.match(/zip|rar/g)"
|
||||
>
|
||||
<font-awesome-icon
|
||||
class="mx-auto mb-2 text-4xl text-white"
|
||||
:icon="['fas', 'file-archive']"
|
||||
/>
|
||||
</template>
|
||||
<template
|
||||
v-else-if="
|
||||
!file.type?.match('image/*') &&
|
||||
@ -266,7 +281,9 @@ const revokeURL = (src) => {
|
||||
</div>
|
||||
<p class="text-2xl my-2">{{ $t("upload.title") }}</p>
|
||||
<p class="mb-0 col-grey">{{ $t("upload.description") }}</p>
|
||||
<p class="mb-0 col-grey">{{ $t("upload.formats") }} : {{props.formats}}</p>
|
||||
<p class="mb-0 col-grey">
|
||||
{{ $t("upload.formats") }} : {{ props.formats }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -38,6 +38,7 @@ import {
|
||||
faFileExcel,
|
||||
faFileWord,
|
||||
faFilePowerpoint,
|
||||
faFileArchive,
|
||||
faFileAlt,
|
||||
faDatabase,
|
||||
faBuilding,
|
||||
@ -97,6 +98,7 @@ library.add(
|
||||
faFileExcel,
|
||||
faFileWord,
|
||||
faFilePowerpoint,
|
||||
faFileArchive,
|
||||
faFileAlt,
|
||||
faDatabase,
|
||||
faBuilding,
|
||||
|
Loading…
Reference in New Issue
Block a user