<template>
    <div class="panel">
        <!-- 四边角标 -->
        <img src="../assets/corner-mark.png" alt="" class="img mark1">
        <img src="../assets/corner-mark.png" alt="" class="img mark2">
        <img src="../assets/corner-mark.png" alt="" class="img mark3">
        <img src="../assets/corner-mark.png" alt="" class="img mark4">

        <!-- 面板上方 -->
        <div class="panel-top">
            <img src="../assets/panel-line.png" alt="" class="line">
            <div>
                <span></span>
                <span class="text">{{title}}</span>
                <span></span>
            </div>
        </div>

        <!-- 插槽 -->
        <div>
            <slot name="body"></slot>
            <!-- <div>啊啊啊啊</div> -->
        </div>

    </div>
</template>
<script>
    export default {
        props: {
            title: {
                type: String,
                default: '景区天气预报'
            },

        }
    }
</script>
<style lang="scss" scoped>
    .panel {
        position: relative;
        // background: linear-gradient(180deg, #0F2577 0%, #071855 100%);
        background: linear-gradient(180deg, #0F2577 0%, #071855 100%);
        box-sizing: border-box;
        padding: 8px;
        width: 100%;
        height: 100%;

        .img {
            position: absolute;
            width: 8px;
            height: 8px;
            display: inline-block;
        }

        .mark1 {
            top: 0px;
            left: 0px;
        }

        .mark2 {
            top: 0;
            right: 0;
            transform: rotate(90deg);
        }

        .mark3 {
            bottom: 0;
            right: 0;
            transform: rotate(180deg);
        }

        .mark4 {
            bottom: 0;
            left: 0;
            transform: rotate(270deg);
        }

        .line {
            width: 59px;
            height: 16px;

        }

        .panel-top {
            position: relative;

            div {
                display: flex;
                align-items: center;
                justify-content: flex-start;
                position: absolute;
                top: 5px;
                left: 10px;

                span:first-child {
                    background: url('../assets/panel-bg-left.png');
                    background-size: 8px 32px;
                    background-color: transparent;
                    display: inline-block;
                    width: 8px;
                    height: 32px;
                }

                span:last-child {
                    background: url('../assets/panel-bg-left.png');
                    background-size: 8px 32px;
                    background-color: transparent;
                    display: inline-block;
                    width: 8px;
                    height: 32px;
                    transform: rotate(180deg);
                }
            }

            .text {
                color: rgba(255, 255, 255, 0.9);
                font-size: 16px;
                line-height: 24px;
                display: inline-block;
                padding: 0px 10px;
                height: 32px;
                display: flex;
                align-items: center;
                justify-content: center;
                background: #005BFF;

            }
        }
    }
</style>