diff --git a/src/renderer/src/AixPPTist/src/views/Screen/ScreenSlideList.vue b/src/renderer/src/AixPPTist/src/views/Screen/ScreenSlideList.vue index 1b0b4c7..4b69c8a 100644 --- a/src/renderer/src/AixPPTist/src/views/Screen/ScreenSlideList.vue +++ b/src/renderer/src/AixPPTist/src/views/Screen/ScreenSlideList.vue @@ -80,6 +80,7 @@ provide(injectKeySlideScale, scale) position: relative; width: 100%; height: 100%; + overflow: hidden; } .slide-item { position: absolute; diff --git a/src/renderer/src/AixPPTist/src/views/Screen/hooks/useExecPlay.ts b/src/renderer/src/AixPPTist/src/views/Screen/hooks/useExecPlay.ts index abccbfd..49c6ba7 100644 --- a/src/renderer/src/AixPPTist/src/views/Screen/hooks/useExecPlay.ts +++ b/src/renderer/src/AixPPTist/src/views/Screen/hooks/useExecPlay.ts @@ -198,7 +198,7 @@ export default (isLoader?: boolean = true) => { const touchInfo = ref<{ x: number; y: number; } | null>(null) const touchStartListener = (e: TouchEvent) => { - e.preventDefault() // 阻止默认事件 + // e.preventDefault() // 阻止默认事件 touchInfo.value = { // x: e.changedTouches[0].pageX, // y: e.changedTouches[0].pageY, @@ -208,6 +208,7 @@ export default (isLoader?: boolean = true) => { } const touchEndListener = (e: TouchEvent) => { if (!touchInfo.value) return + // window.scrollTo(0, 0) // 滚动到顶部 const offsetX = Math.abs(touchInfo.value.x - e.changedTouches[0].clientX) const offsetY = e.changedTouches[0].clientY - touchInfo.value.y if ( Math.abs(offsetY) > offsetX && Math.abs(offsetY) > 50 ) { diff --git a/src/renderer/src/views/model/index.vue b/src/renderer/src/views/model/index.vue index 6ceca61..fb4da79 100644 --- a/src/renderer/src/views/model/index.vue +++ b/src/renderer/src/views/model/index.vue @@ -438,17 +438,23 @@ const toRousrceUrl = async (o) => { if (!!o.src) { // 如果有src就转换 const isBase64 = /^data:image\/(\w+);base64,/.test(o.src) const isBlobUrl = /^blob:/.test(o.src) - let onLineUrl = '' // 线上地址 - if (!!o.zipPath) onLineUrl = pptMedia[o.zipPath] || '' // 是否已上传过 + let onLineUrl = '', typeExt = '' // 线上地址|文件后缀 + if (!!o.zipPath) { + onLineUrl = pptMedia[o.zipPath] || '' // 是否已上传过 + typeExt = o.zipPath.split('.').pop() + } if (onLineUrl) o.src = onLineUrl // 已存在线上地址直接赋值 else { // 不存在重新上传 if (isBase64) { // 相同资源处理 - const url = await getOnlineFileUrl(o.src) + if(!typeExt) typeExt = 'png' + const url = await getOnlineFileUrl(o.src, typeExt) + url &&(o.src = url) url && o.zipPath && (pptMedia[o.zipPath] = url) // 缓存 } else if (isBlobUrl) { // 视频和音频 + if(!typeExt) typeExt = o.type=='video'?'mp4':'mp3' const res = await fetch(o.src) const blob = await res.blob() - const url = await getOnlineFileUrl(blob, o.type=='video'?'mp4':'mp3') + const url = await getOnlineFileUrl(blob, typeExt) URL.revokeObjectURL(o.src) // 释放内存 url &&(o.src = url) url && o.zipPath && (pptMedia[o.zipPath] = url) // 缓存 diff --git a/src/renderer/src/views/prepare/index.vue b/src/renderer/src/views/prepare/index.vue index 444a4bb..da54074 100644 --- a/src/renderer/src/views/prepare/index.vue +++ b/src/renderer/src/views/prepare/index.vue @@ -653,17 +653,23 @@ export default { if (!!o.src) { // 如果有src就转换 const isBase64 = /^data:image\/(\w+);base64,/.test(o.src) const isBlobUrl = /^blob:/.test(o.src) - let onLineUrl = '' // 线上地址 - if (!!o.zipPath) onLineUrl = this.pptMedia[o.zipPath] || '' // 是否已上传过 + let onLineUrl = '', typeExt = '' // 线上地址|文件后缀 + if (!!o.zipPath) { + onLineUrl = this.pptMedia[o.zipPath] || '' // 是否已上传过 + typeExt = o.zipPath.split('.').pop() + } if (onLineUrl) o.src = onLineUrl // 已存在线上地址直接赋值 else { // 不存在重新上传 if (isBase64) { // 相同资源处理 - const url = await this.getOnlineFileUrl(o.src) + if(!typeExt) typeExt = 'png' + const url = await this.getOnlineFileUrl(o.src, typeExt) + url &&(o.src = url) url && o.zipPath && (this.pptMedia[o.zipPath] = url) // 缓存 } else if (isBlobUrl) { // 视频和音频 + if(!typeExt) typeExt = o.type=='video'?'mp4':'mp3' const res = await fetch(o.src) const blob = await res.blob() - const url = await this.getOnlineFileUrl(blob, o.type=='video'?'mp4':'mp3') + const url = await this.getOnlineFileUrl(blob, typeExt) URL.revokeObjectURL(o.src) // 释放内存 url &&(o.src = url) url && o.zipPath && (this.pptMedia[o.zipPath] = url) // 缓存