派生自 wuyushui/SewerAndRainNetwork

陈泽平
2021-05-24 9ce740e0a9eb54c544febfd1f4213618a7ab20e3
src/components/layer/src/layer.vue
@@ -1,26 +1,22 @@
<template>
  <div class="public-bounced map-background" v-drag :style="style">
    <div class="public-bounced-title panel-title" ref="publicBounced">
      <span>{{title}}</span>
      <i class="el-icon-circle-close" @click="max"></i>
      <i class="el-icon-circle-close" @click="close"></i>
      <span>{{ title }}</span>
      <i class="el-icon-close" @click="close"></i>
    </div>
    <div class="public-bounced-content" :id="id">
    </div>
    <div class="public-bounced-content" :id="id"></div>
  </div>
</template>
<script>
import helper from './helper/helper.js'
import '../../../utils/dragBoxes'
export default {
  data () {
    return {
      cls: {
        'vl-notify-iframe': true
      },
      style: {},
      id: 'vlip' + new Date().getTime()
      id: 'sewer_layeropen_' + new Date().getTime()
    }
  },
  props: {
@@ -31,23 +27,29 @@
      }
    }
  },
  computed: {
  },
  async mounted () {
    helper.hiddenScrollBar(this.options)
  computed: {},
  mounted () {
    let left = this.left
    let top = this.top
    if (left > 0) {
      left = left + 'px'
    }
    if (top > 0) {
      top = top + 'px'
    }
    this.style = {
      left: left || '25%',
      top: top || '35%'
    }
  },
  methods: {
    close () {
      this.layer.close(this.id)
    },
    init () {
      console.log('3333333333')
      const propsData = helper.deepClone(this.content.content.data) || {}
      propsData.layerid = this.id
      propsData.lydata = this.content.data
      propsData.lyoption = this.options
      const instance = new this.content.content({
        // 具体参数信息,请参考vue源码
      const propsData = helper.deepClone(this.content.data) || {}
      // console.log(propsData)
      const instance = new this.content.comp({
        // parent: this.content.parent,
        propsData: propsData
      })
@@ -78,11 +80,9 @@
</script>
<style lang="less" scoped>
  .public-bounced {
    z-index: 2000;
    position: absolute;
    top: 35%;
    left: 20%;
.public-bounced {
  z-index: 2000;
  position: absolute;
  .public-bounced-title {
    cursor: move;
@@ -92,38 +92,38 @@
    align-items: center;
    justify-content: space-between;
  span {
    color: #f4f7ff;
    margin: 0 15px;
    font-size: 14px;
  }
    span {
      color: #f4f7ff;
      margin: 0 15px;
      font-size: 14px;
    }
  i {
    color: #C0C4CC;
    margin: 0 15px;
    font-size: 22px;
    cursor: pointer;
  }
    i {
      color: #C0C4CC;
      margin: 0 15px;
      font-size: 22px;
      cursor: pointer;
    }
  i:hover {
    color: #00fff6;
  }
    i:hover {
      color: #00fff6;
    }
  }
  .public-bounced-content {
    padding: 0.1rem;
    //padding: 0.1rem;
    display: flex;
  //align-items: center;
  //justify-content: space-around;
    //align-items: center;
    //justify-content: space-around;
  .public-bounced-content-left {
  //width: 4.8rem;
  }
    .public-bounced-content-left {
      //width: 4.8rem;
    }
  .public-bounced-content-right {
  //width: 3rem;
    margin-left: 0.1rem;
    .public-bounced-content-right {
      //width: 3rem;
      margin-left: 0.1rem;
    }
  }
  }
  }
}
</style>