<template>
    <div class="PopupFrame" v-if="visible">
        <div class="iframe" :style="`width:${layout.width};height:${layout.height}`">
            <!-- <div class="title">
                <span>
                    {{ title }}
                </span>
            </div> -->
            <div class="close" @click="closeBullet"></div>
            <div class="content">
                <!-- 内容部分 -->
                <slot></slot>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    name: 'PopupFrame',

    data () {
        return {
        }
    },

    props: {
        visible: {
            type: Boolean,
            default: false
        },
        title: '',
        layout: {
            type: Object,
            default () {
                return {
                    width: '1440px',
                    height: '815px'
                }
            }
        }
    },

    components: {
    },

    methods: {
        // 关闭弹出框
        closeBullet () {
            this.$emit('beforeClose', false)
        }
    }
}
</script>

<style lang="less">
.PopupFrame {
    position: fixed;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    z-index: 101;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    .iframe {
        width: 1280px;
        height: 721px;
        position: relative;
        background-color: rgba(0, 0, 0, 0.8);
        .title {
            width: 1090px;
            height: 38px;
            text-align: center;
            margin: 0 auto;
            span {
                font-size: 22px;
                font-family: Source Han Sans CN;
                font-weight: bold;
                color: #ffffff;
                line-height: 22px;
                background: linear-gradient(0deg, #a3dcff 0%, #ffffff 100%);
                -webkit-background-clip: text;
                -webkit-text-fill-color: transparent;
                position: relative;
                top: 7px;
            }
        }
        .content {
            margin-top: 15px;
        }
        .close {
            width: 24px;
            height: 24px;
            background: url('../../static/images/index/bulletFrame-close.png')
                no-repeat left top;
            position: absolute;
            top: 36px;
            right: 19px;
            cursor: pointer;
        }
    }
}
</style>