From afab3a98a65f7fb4f342251238ab3c329e4242dd Mon Sep 17 00:00:00 2001 From: inleft <inleft@qq.com> Date: Tue, 30 Aug 2022 18:44:23 +0800 Subject: [PATCH] 调整统计脚本渲染逻辑 新增自定义表情组件 --- src/components/layouts/baseLayout.vue | 52 ++++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 48 insertions(+), 4 deletions(-) diff --git a/src/components/layouts/baseLayout.vue b/src/components/layouts/baseLayout.vue index a168c40..bf72da2 100644 --- a/src/components/layouts/baseLayout.vue +++ b/src/components/layouts/baseLayout.vue @@ -5,13 +5,22 @@ <tag-Header /> </a-layout-header> - <router-view></router-view> + <keep-alive> + <router-view @showMyVideo="showMyVideo" @detailBackAction="detailBackAction"></router-view> + </keep-alive> <a-layout-footer> <AplayerBox /> <tagFooter /> + <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> <a-icon type="up" />回到顶部 </a-back-top> @@ -20,22 +29,51 @@ </template> <script> + // Dplayer Api地址 + // http://dplayer.js.org/ import tagHeader from "../fixed/header.vue" - import tagFooter from "../fixed/footer.vue" + // import tagFooter from "../fixed/footer.vue" + const tagFooter = () => import("../fixed/footer.vue") import AplayerBox from "../mini/Aplayer.vue" + import MyVideo from "../group/MyVideo.vue" export default { components: { tagHeader, tagFooter, AplayerBox, + MyVideo, }, data() { return { - + miniVideoPlayData: null, + firstQuery: true, + showMiniBox: false, + miniBoxContent: "视频盒子", } }, methods: { + showMyVideo(param) { + this.miniVideoPlayData = param; + this.$refs.MyVideo.showModal(param); + }, + detailBackAction(param) { + this.miniVideoPlayData = param; + this.closeMyVideo() + }, + 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); @@ -90,6 +128,10 @@ } } + .ant-timeline-item-head { + background-color: transparent !important; + } + } span, @@ -111,6 +153,8 @@ -webkit-animation-iteration-count: 1; } + + .fadeInLeft { -webkit-animation-name: "fadeInLeft"; -webkit-animation-duration: 1s; -- Gitblit v1.9.1