<template>
    <div class="header" >
       <image @click="onClickLeft" class="arrow" src="https://ct.zzxcx.net/ctjk/mp-wx/beforeMockExam/arrow-left.png"></image>
        <span class="title">{{ title }}</span>
    </div>
</template>

<script>
import mIcon from './../m-icon/m-icon.vue'
export default {
    data() {
        return {

        }
    },
    components: {
        mIcon,
    },
    props: {
        transparent: {
            type: Boolean,
            default: false
        },
        title: {
            type: String,
            default: ''
        },
        iconStyle: {
            type: String,
            default: ''
        }
    },
    methods: {
        onClickLeft() {
           uni.navigateBack()
        }
    },

}
</script>

<style lang="less" scoped>
.header {
    position: sticky;
    top: 0;
    font-size: 15px;
    padding: 15px;
    z-index: 999;
    .arrow{
        width: 10px;
        height: 17px;
    }

    .title {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        color: #fff;
    }
}
</style>