|
@@ -1,9 +1,7 @@
|
|
|
import { onMounted, onUnmounted, watch } from "vue"
|
|
|
import { useSlidesStore } from "@/store"
|
|
|
-import useExecPlay from "@/views/Screen/hooks/useExecPlay"
|
|
|
|
|
|
-export const changePageSlideMes = () => {
|
|
|
- const { execPrev, execNext } = useExecPlay()
|
|
|
+export const changePageSlideMes = (changePageSlide: (type: "prev" | "next") => void) => {
|
|
|
const slidesStore = useSlidesStore()
|
|
|
|
|
|
/** 初始化ppt完成之后给父级传递消息 */
|
|
@@ -13,11 +11,7 @@ export const changePageSlideMes = () => {
|
|
|
function handleMessage(event: any) {
|
|
|
const { type, content } = event.data || {}
|
|
|
if (type === "changePageSlide") {
|
|
|
- if (content === "prev") {
|
|
|
- execPrev()
|
|
|
- } else if (content === "next") {
|
|
|
- execNext()
|
|
|
- }
|
|
|
+ changePageSlide(content)
|
|
|
}
|
|
|
}
|
|
|
|