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 @@