<template>
  <div class="top-header">
      <span class="back-btn" @click="back">
        <van-icon name="arrow-left" color="#333" />
      </span>
      <span class="title">{{title}}</span>
    </div>
</template>

<script>
export default {
  name: "Topheader",
  data() {
    return {
      
    };
  },
  props: {
    title: String
  },
  methods: {
   back: function() {
      this.$router.go(-1);
    },
  }
};
</script>

<style  scoped>
.top-header {
  display: flex;
  align-items: center;
  height: 0.88rem;
  background: #fff;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  font-size: 0.36rem;
  color: #333;
  z-index:999;
}
.back-btn {
  display: flex;
  align-items: center;
  height: 0.88rem;
  width: 0.88rem;
  padding-left: 0.3rem;
  position: absolute;
  left:0;
}
.title{
  flex:1;
  text-align: center;
}

</style>
