派生自 wuyushui/SewerAndRainNetwork

yangdelong
2021-05-29 977955d716039c91fd6292b159e50e15c62100a1
src/components/layer/src/layer.vue
@@ -2,7 +2,7 @@
  <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="close"></i>
      <i class="el-icon-close" style="font-size: 16px;" @click="close"></i>
    </div>
    <div class="public-bounced-content" :id="id"></div>
  </div>
@@ -10,6 +10,7 @@
<script>
import helper from './helper/helper.js'
import '../../../utils/dragBoxes'
export default {
  data () {
@@ -28,6 +29,18 @@
  },
  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 () {
@@ -35,10 +48,8 @@
    },
    init () {
      const propsData = helper.deepClone(this.content.data) || {}
      propsData.layerid = this.id
      propsData.lydata = this.content.data
      propsData.lyoption = this.options
      const instance = new this.content.content({
      // console.log(propsData)
      const instance = new this.content.comp({
        // parent: this.content.parent,
        propsData: propsData
      })
@@ -72,13 +83,11 @@
.public-bounced {
  z-index: 2000;
  position: absolute;
  top: 35%;
  left: 20%;
  .public-bounced-title {
    cursor: move;
    height: 0.1rem;
    padding: 10px 0;
    //height: 0.1rem;
    //padding: 10px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
@@ -86,7 +95,7 @@
    span {
      color: #f4f7ff;
      margin: 0 15px;
      font-size: 14px;
      font-size: 16px;
    }
    i {