<template>
|
<div class="public-bounced map-background" v-drag>
|
<div class="public-bounced-title panel-title" ref="publicBounced">
|
<span>{{options.title}}</span>
|
<i class="el-icon-circle-close" @click="close"></i>
|
</div>
|
<div class="public-bounced-content" :id="id">
|
{{options.content}}
|
</div>
|
</div>
|
</template>
|
|
<script>
|
import helper from './helper/helper.js'
|
|
export default {
|
data () {
|
return {
|
cls: {
|
'vl-notify-iframe': true
|
},
|
id: 'vlip' + new Date().getTime()
|
}
|
},
|
props: {
|
options: {
|
type: Object,
|
default: function () {
|
return {}
|
}
|
}
|
},
|
computed: {
|
contentStyle () {
|
return {
|
height: 'calc(100% - 50px)', // parseInt(this.options.area[1]) - 50 + "px",
|
minHeight: '20px',
|
overflow: 'auto'
|
}
|
}
|
},
|
async mounted () {
|
this.getContent()
|
helper.hiddenScrollBar(this.options)
|
},
|
methods: {
|
close () {
|
|
},
|
async getContent () {
|
await helper.sleep(10)
|
const propsData = helper.deepClone(this.options.content.data) || {}
|
propsData.layerid = this.options.id
|
propsData.lydata = this.options.content.data
|
propsData.lyoption = this.options
|
console.log(this.options.content.content)
|
const instance = new this.options.content.content({
|
// 具体参数信息,请参考vue源码
|
parent: this.options.content.parent,
|
propsData: propsData
|
})
|
instance.vm = instance.$mount()
|
document.getElementById(this.id).appendChild(instance.vm.$el)
|
this.options.layer.instancesVue[this.options.id].iframe = instance.vm
|
},
|
|
btnyes (event) {
|
helper.btnyes(event, this.options)
|
},
|
btncancel (event) {
|
helper.btncancel(event, this.options)
|
}
|
}
|
}
|
</script>
|
|
<style lang="less" scoped>
|
.public-bounced {
|
z-index: 2000;
|
position: absolute;
|
top: 35%;
|
left: 20%;
|
|
.public-bounced-title {
|
cursor: move;
|
height: 0.1rem;
|
padding: 10px 0;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
|
span {
|
color: #f4f7ff;
|
margin: 0 15px;
|
font-size: 14px;
|
}
|
|
i {
|
color: #C0C4CC;
|
margin: 0 15px;
|
font-size: 22px;
|
cursor: pointer;
|
}
|
|
i:hover {
|
color: #00fff6;
|
}
|
}
|
|
.public-bounced-content {
|
padding: 0.1rem;
|
display: flex;
|
//align-items: center;
|
//justify-content: space-around;
|
|
.public-bounced-content-left {
|
//width: 4.8rem;
|
}
|
|
.public-bounced-content-right {
|
//width: 3rem;
|
margin-left: 0.1rem;
|
}
|
}
|
}
|
</style>
|