feat: update
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<script setup>
|
||||
import { mediaService } from '@/api/mediaService';
|
||||
import { postService } from '@/api/postService';
|
||||
import { formatDate } from "@/utils/date";
|
||||
import { formatDate, formatDuration } from "@/utils/date";
|
||||
import { formatFileSize } from "@/utils/filesize";
|
||||
import { getFileIcon, getFileTypeByMimeCN } from "@/utils/filetype";
|
||||
import { useToast } from 'primevue/usetoast';
|
||||
@@ -373,10 +373,16 @@ const loadHeadImagePreviews = async () => {
|
||||
</div>
|
||||
|
||||
<div class="flex-1 overflow-hidden">
|
||||
<div class="text-sm font-medium text-gray-900 truncate">{{ media.name }}
|
||||
<div class="text-sm font-medium text-gray-900 truncate">
|
||||
{{ media.name }}
|
||||
</div>
|
||||
|
||||
<Badge :value="getFileTypeByMimeCN(media.mime_type)" />
|
||||
<div class="flex gap-2">
|
||||
<Badge :value="getFileTypeByMimeCN(media.mime_type)" />
|
||||
<Badge v-if="media.metas?.short" severity="warn" value="试听" />
|
||||
<Badge v-if="media.metas?.duration" severity="secondary"
|
||||
:value="'时长:' + formatDuration(media.metas?.duration)" />
|
||||
</div>
|
||||
</div>
|
||||
<Button icon="pi pi-times" class="p-button-rounded p-button-text p-button-sm"
|
||||
@click="removeMedia(media)" aria-label="移除" />
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup>
|
||||
import { mediaService } from '@/api/mediaService';
|
||||
import { postService } from '@/api/postService';
|
||||
import { formatDate } from "@/utils/date";
|
||||
import { formatDate, formatDuration } from "@/utils/date";
|
||||
import { formatFileSize } from "@/utils/filesize";
|
||||
import { getFileIcon, getFileTypeByMimeCN } from "@/utils/filetype";
|
||||
import { useToast } from 'primevue/usetoast';
|
||||
@@ -425,7 +425,14 @@ onMounted(() => {
|
||||
<div class="text-sm font-medium text-gray-900 truncate">{{ media.name }}
|
||||
</div>
|
||||
|
||||
<Badge :value="getFileTypeByMimeCN(media.mime_type)" />
|
||||
<!-- <Badge :value="getFileTypeByMimeCN(media.mime_type)" /> -->
|
||||
|
||||
<div class="flex gap-2">
|
||||
<Badge :value="getFileTypeByMimeCN(media.mime_type)" />
|
||||
<Badge v-if="media.metas?.short" severity="warn" value="试听" />
|
||||
<Badge v-if="media.metas?.duration" severity="secondary"
|
||||
:value="'时长:' + formatDuration(media.metas?.duration)" />
|
||||
</div>
|
||||
</div>
|
||||
<Button icon="pi pi-times" class="p-button-rounded p-button-text p-button-sm"
|
||||
@click="removeMedia(media)" aria-label="移除" />
|
||||
|
||||
Reference in New Issue
Block a user