|
@@ -1,4 +1,4 @@
|
|
-import { PropType, computed, defineComponent, nextTick, onBeforeMount, onMounted, reactive } from "vue";
|
|
|
|
|
|
+import { PropType, computed, defineComponent, nextTick, onBeforeMount, onMounted, onUnmounted, reactive } from "vue";
|
|
import styles from "./index.module.less";
|
|
import styles from "./index.module.less";
|
|
import icons from "./image/icons.json";
|
|
import icons from "./image/icons.json";
|
|
import { FIGNER_INSTRUMENT_DATA, IFIGNER_INSTRUMENT_Note } from "/src/view/figner-preview";
|
|
import { FIGNER_INSTRUMENT_DATA, IFIGNER_INSTRUMENT_Note } from "/src/view/figner-preview";
|
|
@@ -209,6 +209,20 @@ export default defineComponent({
|
|
}
|
|
}
|
|
}
|
|
}
|
|
);
|
|
);
|
|
|
|
+ /** 课件播放 */
|
|
|
|
+ const changePlay = (res: any) => {
|
|
|
|
+ if (res?.data?.api === "setPlayState") {
|
|
|
|
+ handleStop();
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ onMounted(() => {
|
|
|
|
+ window.addEventListener("message", changePlay);
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ onUnmounted(() => {
|
|
|
|
+ window.removeEventListener("message", changePlay);
|
|
|
|
+ });
|
|
return () => {
|
|
return () => {
|
|
const relationship = fingerData.subject?.relationship?.[data.realKey] || [];
|
|
const relationship = fingerData.subject?.relationship?.[data.realKey] || [];
|
|
const rs: number[] = Array.isArray(relationship[1])
|
|
const rs: number[] = Array.isArray(relationship[1])
|