<template>
    <div :class="['haeder',color]">
        <span class="left" @click="aa">← {{title}}</span>|<span class="right">{{content}}</span>
    </div>
</template>
<script>
export default {
    name:"cheng-header",
    props:{
        color:{
            type:String,
            default:"red"
        },
        title:{
            type:String,
            default:"返回"
        },
        content:String
        
    },
    methods: {
        aa(){
            this.$router.go(-1)
        }
    },
}
</script>
<style lang="scss" scoped>
    .haeder{
        width: 100%;
        height: 10vh;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        color: #FFFFFF
    }
    .left{
        padding: 10px;
    }
    .left:hover{
        cursor: pointer;
    }
    .right{
        font-size: 20px;
        padding: 10px;
    }
    .red{
        background: red;
    }
    .yellow{
        background: yellow;
    }
    .blue{
        background: blue;
    }
</style>