From 545ba46e971816dc56b4ea80e48ed26a4b152d62 Mon Sep 17 00:00:00 2001 From: 徐旺旺 <11530253@qq.com> Date: 星期一, 19 四月 2021 14:04:07 +0800 Subject: [PATCH] Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop --- src/components/layer/src/layer.vue | 106 ++++++++++++++++++++++++++++------------------------- 1 files changed, 56 insertions(+), 50 deletions(-) diff --git a/src/components/layer/src/layer.vue b/src/components/layer/src/layer.vue index 4b281a0..2b233d7 100644 --- a/src/components/layer/src/layer.vue +++ b/src/components/layer/src/layer.vue @@ -1,7 +1,7 @@ <template> - <div class="public-bounced map-background" v-drag> + <div class="public-bounced map-background" v-drag :style="style"> <div class="public-bounced-title panel-title" ref="publicBounced"> - <span>{{title}}</span> + <span>{{ title }}</span> <i class="el-icon-circle-close" @click="close"></i> </div> <div class="public-bounced-content" :id="id"> @@ -15,10 +15,8 @@ export default { data () { return { - cls: { - 'vl-notify-iframe': true - }, - id: 'vlip' + new Date().getTime() + style: {}, + id: 'sewer_layeropen_' + new Date().getTime() } }, props: { @@ -29,46 +27,54 @@ } } }, - computed: { - contentStyle () { - return { - height: 'calc(100% - 50px)', // parseInt(this.options.area[1]) - 50 + "px", - minHeight: '20px', - overflow: 'auto' - } - } - }, - async mounted () { - helper.hiddenScrollBar(this.options) + computed: {}, + mounted () { }, methods: { close () { this.layer.close(this.id) }, init () { - console.log('3333333333') - const propsData = helper.deepClone(this.content.content.data) || {} + 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({ - // 鍏蜂綋鍙傛暟淇℃伅锛岃鍙傝�僾ue婧愮爜 // parent: this.content.parent, propsData: propsData }) instance.vm = instance.$mount() document.getElementById(this.id).appendChild(instance.vm.$el) + }, + max () { + // 鏈�澶у寲绐楀彛 + let height = document.documentElement.clientHeight + if (height % 2 === 1) { + height += 1 + } + this.style = { + overflow: 'hidden', + left: '50%', + width: '100%', + height: height + 'px', + minHeight: '42px' + } + this.maxMiniState = 2 + }, + maxmini () { // 杩樺師 + document.getElementById(this.options.id).removeAttribute('style') + this.maxMiniState = 0 } } } </script> <style lang="less" scoped> - .public-bounced { - z-index: 2000; - position: absolute; - top: 35%; - left: 20%; +.public-bounced { + z-index: 2000; + position: absolute; + top: 35%; + left: 20%; .public-bounced-title { cursor: move; @@ -78,38 +84,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> -- Gitblit v1.8.0