提交 101a7799 authored 作者: lihuihui's avatar lihuihui

课件预览的名字

上级 80f0b1e6
......@@ -38,7 +38,7 @@ const showFileList = computed(() => {
// 上传之前
const handleBeforeUpload = async (file: any) => {
const fileName = file.name
const key = props.prefix + md5(fileName + new Date().getTime()) + fileName.substr(fileName.lastIndexOf('.'))
const key = props.prefix + md5(fileName + new Date().getTime()) + '/' + fileName
const response: Record<string, any> = await getSignature()
uploadData.value = {
key,
......
......@@ -28,9 +28,12 @@ if (props.item?.url?.indexOf('.pdf') !== -1 || props.item?.url?.indexOf('.txt')
<template>
<el-card>
<div class="max-w-h">
<iframe v-if="isShowType === 1" :src="`https://view.officeapps.live.com/op/view.aspx?src=${props.item?.url}`">{{
item.name
}}</iframe>
<iframe
id="iframe"
v-if="isShowType === 1"
:src="`https://view.officeapps.live.com/op/view.aspx?src=${props.item?.url}`"
>{{ item.name }}</iframe
>
<embed :src="props.item?.url" v-else-if="isShowType === 2" />
<video v-else-if="isShowType === 3" controls id="video">
<source :src="props.item?.url" />
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论