| | |
| | | }" |
| | | > |
| | | <div class="d-frame-title" v-drag="fullScreen" @click="frameClick"> |
| | | <div class="icon iconfont back" @click="back"></div> |
| | | <div class="icon iconfont back" @click="back" v-if="isShowBack"> |
| | |  |
| | | </div> |
| | | <div class="d-frame-title-operation"> |
| | | <i |
| | | class="icon-minus d-frame-operation-minus" |
| | |
| | | props: { |
| | | data: Object, |
| | | }, |
| | | created() { |
| | | this.addBackListener(); |
| | | }, |
| | | data() { |
| | | return { |
| | | publicPath: process.env.BASE_URL, |
| | |
| | | mouY: 0, |
| | | resizeLock: false, |
| | | }, |
| | | isShowBack: false, |
| | | }; |
| | | }, |
| | | watch: { |
| | |
| | | //return false; |
| | | }, |
| | | |
| | | // 菜单栏返回 |
| | | back() { |
| | | let active = this.$store.state.desktop.minDocks; |
| | | active = active.filter((item) => item.highlight); |
| | | console.log(`返回${active.alt}`); |
| | | console.log(active); |
| | | const iframeArr = document.querySelectorAll("iframe"); |
| | | iframeArr.forEach((item) => { |
| | | item.contentWindow.postMessage({ msg: `返回${active[0].alt}` }, "*"); |
| | | }); |
| | | }, |
| | | // 添加返回按钮相关监听 |
| | | addBackListener() { |
| | | //显示返回按钮 |
| | | window.addEventListener("message", (e) => { |
| | | if (e.data.msg === "showBack") { |
| | | this.isShowBack = true; |
| | | } |
| | | }); |
| | | //隐藏返回按钮 |
| | | window.addEventListener("message", (e) => { |
| | | if (e.data.msg === "hiddenBack") { |
| | | this.isShowBack = false; |
| | | } |
| | | }); |
| | | }, |
| | | }, |
| | |
| | | .d-frame-title-content { |
| | | line-height: 30px; |
| | | text-align: center; |
| | | background: #eeeeee; |
| | | background: #ffffff; |
| | | } |
| | | |
| | | .d-frame-title-content img { |