|
@@ -1,11 +1,5 @@
|
|
<template>
|
|
<template>
|
|
- <div
|
|
|
|
- class="enjoyPlayer"
|
|
|
|
- v-click-outside="handleListOutside"
|
|
|
|
- :style="{
|
|
|
|
- transform: `scale(${scaleStyle})`
|
|
|
|
- }"
|
|
|
|
- >
|
|
|
|
|
|
+ <div class="enjoyPlayer" v-click-outside="handleListOutside">
|
|
<div v-if="!isBase" v-show="isShowEnjoyPlayerList" class="enjoyPlayerList">
|
|
<div v-if="!isBase" v-show="isShowEnjoyPlayerList" class="enjoyPlayerList">
|
|
<div class="titNameCon">
|
|
<div class="titNameCon">
|
|
<div class="titName">
|
|
<div class="titName">
|
|
@@ -85,7 +79,6 @@ import message from "@/utils/message"
|
|
import type { PPTEnjoyElement } from "@/types/slides"
|
|
import type { PPTEnjoyElement } from "@/types/slides"
|
|
import { useSlidesStore, useMainStore } from "@/store"
|
|
import { useSlidesStore, useMainStore } from "@/store"
|
|
import draggable from "vuedraggable"
|
|
import draggable from "vuedraggable"
|
|
-import queryParams from "@/queryParams"
|
|
|
|
|
|
|
|
const slidesStore = useSlidesStore()
|
|
const slidesStore = useSlidesStore()
|
|
const mainStore = useMainStore()
|
|
const mainStore = useMainStore()
|
|
@@ -102,8 +95,6 @@ const props = withDefaults(
|
|
isBase: false
|
|
isBase: false
|
|
}
|
|
}
|
|
)
|
|
)
|
|
-// 学生端 不是isBase预览下面的缩放比例
|
|
|
|
-const scaleStyle = queryParams.fromType === "CLASS" && !props.isBase && props.isScreening ? 1.5 : 1
|
|
|
|
|
|
|
|
function handleListOutside() {
|
|
function handleListOutside() {
|
|
if (!props.isBase && isShowEnjoyPlayerList.value) {
|
|
if (!props.isBase && isShowEnjoyPlayerList.value) {
|
|
@@ -306,7 +297,7 @@ const handleError = () => message.error("音频加载失败")
|
|
const thumbMove = (e: MouseEvent | TouchEvent) => {
|
|
const thumbMove = (e: MouseEvent | TouchEvent) => {
|
|
if (!audioRef.value || !playBarWrap.value) return
|
|
if (!audioRef.value || !playBarWrap.value) return
|
|
const clientX = "clientX" in e ? e.clientX : e.changedTouches[0].clientX
|
|
const clientX = "clientX" in e ? e.clientX : e.changedTouches[0].clientX
|
|
- let percentage = (clientX - getBoundingClientRectViewLeft(playBarWrap.value)) / playBarWrap.value.clientWidth / props.scale / scaleStyle
|
|
|
|
|
|
+ let percentage = (clientX - getBoundingClientRectViewLeft(playBarWrap.value)) / playBarWrap.value.clientWidth / props.scale
|
|
percentage = Math.max(percentage, 0)
|
|
percentage = Math.max(percentage, 0)
|
|
percentage = Math.min(percentage, 1)
|
|
percentage = Math.min(percentage, 1)
|
|
const time = percentage * duration.value
|
|
const time = percentage * duration.value
|
|
@@ -319,7 +310,7 @@ const thumbUp = (e: MouseEvent | TouchEvent) => {
|
|
if (!audioRef.value || !playBarWrap.value) return
|
|
if (!audioRef.value || !playBarWrap.value) return
|
|
|
|
|
|
const clientX = "clientX" in e ? e.clientX : e.changedTouches[0].clientX
|
|
const clientX = "clientX" in e ? e.clientX : e.changedTouches[0].clientX
|
|
- let percentage = (clientX - getBoundingClientRectViewLeft(playBarWrap.value)) / playBarWrap.value.clientWidth / props.scale / scaleStyle
|
|
|
|
|
|
+ let percentage = (clientX - getBoundingClientRectViewLeft(playBarWrap.value)) / playBarWrap.value.clientWidth / props.scale
|
|
percentage = Math.max(percentage, 0)
|
|
percentage = Math.max(percentage, 0)
|
|
percentage = Math.min(percentage, 1)
|
|
percentage = Math.min(percentage, 1)
|
|
const time = percentage * duration.value
|
|
const time = percentage * duration.value
|
|
@@ -347,7 +338,6 @@ const handleMousedownPlayBar = () => {
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
.enjoyPlayer {
|
|
.enjoyPlayer {
|
|
- transform-origin: center bottom;
|
|
|
|
.playerCon {
|
|
.playerCon {
|
|
background: linear-gradient(180deg, #ffffff 0%, #dfdfdf 100%);
|
|
background: linear-gradient(180deg, #ffffff 0%, #dfdfdf 100%);
|
|
box-shadow:
|
|
box-shadow:
|
|
@@ -483,7 +473,6 @@ const handleMousedownPlayBar = () => {
|
|
}
|
|
}
|
|
.enjoyPlayerList {
|
|
.enjoyPlayerList {
|
|
width: 100%;
|
|
width: 100%;
|
|
- height: 524px;
|
|
|
|
position: absolute;
|
|
position: absolute;
|
|
left: 0;
|
|
left: 0;
|
|
bottom: 51px;
|
|
bottom: 51px;
|
|
@@ -520,7 +509,8 @@ const handleMousedownPlayBar = () => {
|
|
.enjoyPlayerListCon {
|
|
.enjoyPlayerListCon {
|
|
margin-top: 20px;
|
|
margin-top: 20px;
|
|
overflow-y: auto;
|
|
overflow-y: auto;
|
|
- height: calc(100% - 58px);
|
|
|
|
|
|
+ max-height: 316px;
|
|
|
|
+ min-height: 140px;
|
|
padding-right: 10px;
|
|
padding-right: 10px;
|
|
.playerItem {
|
|
.playerItem {
|
|
padding: 18px 5px 18px 10px;
|
|
padding: 18px 5px 18px 10px;
|