Skip to content

Commit

Permalink
变量名改成videoplayerstore
Browse files Browse the repository at this point in the history
  • Loading branch information
putianyi889 committed Jul 19, 2024
1 parent 82caf51 commit bbbaac2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions front_end/src/components/PlayerDialog.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<el-dialog v-model="playerstore.visible" style="backdrop-filter: blur(1px);" draggable align-center destroy-on-close
<el-dialog v-model="videoplayerstore.visible" style="backdrop-filter: blur(1px);" draggable align-center destroy-on-close
:modal="false" :lock-scroll="false">
<iframe class="flop-player-iframe flop-player-display-none" style="width: 100%; height: 500px; border: 0px"
src="/flop/index.html" ref="video_iframe"></iframe>
Expand All @@ -8,18 +8,18 @@

<script setup lang="ts">
import { usePlayerStore } from '@/store';
import { useVideoPlayerStore } from '@/store';
import useCurrentInstance from '@/utils/common/useCurrentInstance';
import { watch } from 'vue';
import { generalNotification } from '@/utils/system/status';
import { useI18n } from 'vue-i18n';
const { proxy } = useCurrentInstance();
const playerstore = usePlayerStore();
const videoplayerstore = useVideoPlayerStore();
const t = useI18n();
watch(playerstore, (newPlayerStore: any, oldPlayerStore: any) => {
if (newPlayerStore.visible) {
preview(newPlayerStore.id)
watch(videoplayerstore, () => {
if (videoplayerstore.visible) {
preview(videoplayerstore.id)
}
})
Expand Down Expand Up @@ -70,7 +70,7 @@ const playVideo = function (url: string) {
anonymous: false,
background: "rgba(0, 0, 0, 0)",
listener: function () {
playerstore.visible = false;
videoplayerstore.visible = false;
(window as any).flop = null;
},
});
Expand Down
8 changes: 4 additions & 4 deletions front_end/src/utils/common/PlayerDialog.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { usePlayerStore } from "@/store";
import { useVideoPlayerStore } from "@/store";

const playerstore = usePlayerStore();
const videoplayerstore = useVideoPlayerStore();

export const preview = (id: number | undefined) => {
if (!id) {
return;
}
playerstore.id = id;
playerstore.visible = true;
videoplayerstore.id = id;
videoplayerstore.visible = true;
}

0 comments on commit bbbaac2

Please sign in to comment.