ZZJ
2021-10-20 07958c244e49e561718b97cac6a7168eeb61b5e7
src/pages/desktop/index/components/DFrame.vue
@@ -8,7 +8,8 @@
    v-bind:style="{left: data.leftOffset + 'px', top: data.topOffset + 'px', 'z-index': 125 + data.order, width: width + 'px', height: height + 'px'}"
  >
    <div class="d-frame-title" v-drag='fullScreen' @click="frameClick">
      <div class="d-frame-title-operation">
      <div class="icon iconfont back" @click="back">&#xe718;</div>
      <div class="d-frame-title-operation">
        <i class="icon-minus d-frame-operation-minus" @click="minFrame(data,$event)">
          <img :src="`${publicPath}images/desktop/header-icon/min.png`" alt />
        </i>
@@ -52,7 +53,6 @@
<script>
import html2canvas from 'html2canvas';
export default {
  name: "DFrame",
  props: {
@@ -86,14 +86,12 @@
    }
  },
  mounted() {
    console.log(document.querySelectorAll('iframe'))
    window.addEventListener('message', (d) => {
      let { source, trigger, menuT, menuL } = d.data;
      if (trigger == 'contextmenu') {
        this.openMenuList(menuT, menuL)
      }
    });
  },
  methods: {
    openMenuList(t, l, frame) {
@@ -192,6 +190,16 @@
      //return false;
    },
    back(){
      let active = this.$store.state.desktop.minDocks
      active = active.filter(item => item.highlight)
      console.log(`返回${active.alt}`);
      const iframeArr = document.querySelectorAll("iframe")
      iframeArr.forEach(item=>{
          item.contentWindow.postMessage({msg:`返回${active[0].alt}`},"*")
      })
    }
  },
  directives: {
@@ -306,6 +314,13 @@
  z-index: 2;
}
.back {
  position: absolute;
  cursor: pointer;
  top: 8px;
  left: 10px;
}
.d-frame-title-operation i {
  font-size: 18px;
  display: inline-block;
@@ -340,7 +355,7 @@
.d-frame-title-content {
  line-height: 30px;
  text-align: center;
  background: #dee1e6;
  background: #eeeeee;
}
.d-frame-title-content img {
@@ -355,15 +370,15 @@
  position: relative;
  top: -1px;
  font-size: 15px;
  color: #777;
  /* font-family: '黑体'; */
 color: #000000;
  font-family: "PingFang SC";
}
.d-frame-content {
  width: 100%;
  height: calc(100% - 30px);
  border-radius: 0 0 4px 4px;
  background-color: #fff;
  /* background-color: #fff; */
}
.d-frame-full .d-frame-content{
  height: calc(100% - 71px);