派生自 wuyushui/SewerAndRainNetwork

陈泽平
2021-05-18 58fe00c41f4c499b604d2c504542dbb1272382f2
src/components/layer/src/layer.vue
@@ -4,13 +4,13 @@
      <span>{{ title }}</span>
      <i class="el-icon-circle-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 () {
@@ -29,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 () {
@@ -36,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
      })
@@ -73,8 +83,6 @@
.public-bounced {
  z-index: 2000;
  position: absolute;
  top: 35%;
  left: 20%;
  .public-bounced-title {
    cursor: move;