From e4f0862bd8af0ac1c7aab59904b69dd071526aff Mon Sep 17 00:00:00 2001 From: inleft <inleft@qq.com> Date: Fri, 12 Aug 2022 23:59:41 +0800 Subject: [PATCH] 视频模块添加播放历史 --- src/components/layouts/baseLayout.vue | 30 ++++++++++++++++++++++++++++-- 1 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/components/layouts/baseLayout.vue b/src/components/layouts/baseLayout.vue index 0d14dee..f5b0b62 100644 --- a/src/components/layouts/baseLayout.vue +++ b/src/components/layouts/baseLayout.vue @@ -12,7 +12,13 @@ <a-layout-footer> <AplayerBox /> <tagFooter /> - <MyVideo ref="MyVideo" /> + <MyVideo ref="MyVideo" @closeMyVideo="closeMyVideo" /> + + <a-button v-if="miniVideoPlayData!=null && showMiniBox" class="fadeInRight" + style="position: fixed;right: 0px;bottom: 130px;" @click="showMyVideo(miniVideoPlayData)"> + {{miniBoxContent}} + <a-icon type="youtube" style="transform: scale(1.5);" /> + </a-button> </a-layout-footer> <a-back-top> @@ -23,6 +29,8 @@ </template> <script> + // Dplayer Api地址 + // http://dplayer.js.org/ import tagHeader from "../fixed/header.vue" import tagFooter from "../fixed/footer.vue" import AplayerBox from "../mini/Aplayer.vue" @@ -36,13 +44,31 @@ }, data() { return { - + miniVideoPlayData: null, + firstQuery: true, + showMiniBox: false, + miniBoxContent: "视频盒子", } }, methods: { showMyVideo(param) { + this.miniVideoPlayData = param; this.$refs.MyVideo.showModal(param); }, + closeMyVideo() { + if (this.firstQuery) { + this.firstQuery = !this.firstQuery; + this.showMiniBox = !this.showMiniBox; + this.$notification.info({ + message: '视频盒子最小化啦..', + placement: 'bottomRight', + }); + + setTimeout(() => { + this.miniBoxContent = ""; + }, 6000); + } + }, // 下载文件 down: function() { console.log(111); -- Gitblit v1.9.1