From 36a8471dd03ae85c58452d9fe9bcaa33783f3b81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E8=BE=89?= Date: Wed, 4 Dec 2024 15:31:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E9=80=89=E6=8B=A9=E5=99=A8?= =?UTF-8?q?=E7=9A=84url=E5=92=8C=E9=99=84=E4=BB=B6=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E7=9A=84url=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/fileSelector/fileItem.vue | 7 ++++--- web/src/views/system/fileList/index.vue | 10 ++++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/web/src/components/fileSelector/fileItem.vue b/web/src/components/fileSelector/fileItem.vue index 1029ddf..66adb1d 100644 --- a/web/src/components/fileSelector/fileItem.vue +++ b/web/src/components/fileSelector/fileItem.vue @@ -13,15 +13,16 @@ import { defineComponent } from 'vue'; import { ref, defineProps, PropType, watch, onMounted, h } from 'vue'; import { successNotification } from '/@/utils/message'; +import { getBaseURL } from '/@/utils/baseUrl'; const props = defineProps({ fileData: { type: Object as PropType, required: true }, api: { type: Object as PropType, required: true }, }); const _OtherFileComponent = defineComponent({ template: '' }); const FileTypes = [ - { tag: 'img', attr: { src: props.fileData.url, draggable: false } }, - { tag: 'video', attr: { src: props.fileData.url, controls: false, autoplay: true, muted: true, loop: true } }, - { tag: 'audio', attr: { src: props.fileData.url, controls: true, autoplay: false, muted: false, loop: false, volume: 0 } }, + { tag: 'img', attr: { src: getBaseURL(props.fileData.url), draggable: false } }, + { tag: 'video', attr: { src: getBaseURL(props.fileData.url), controls: false, autoplay: true, muted: true, loop: true } }, + { tag: 'audio', attr: { src: getBaseURL(props.fileData.url), controls: true, autoplay: false, muted: false, loop: false, volume: 0 } }, { tag: _OtherFileComponent, attr: { style: { fontSize: '2rem' } } }, ]; const isShow = ref(false); diff --git a/web/src/views/system/fileList/index.vue b/web/src/views/system/fileList/index.vue index c507281..3a990cf 100644 --- a/web/src/views/system/fileList/index.vue +++ b/web/src/views/system/fileList/index.vue @@ -12,15 +12,17 @@