index.vue 882 Bytes
<template>
  <div class="floor-header">
    <span class="back" @click="handleClose">
      <img src= "@/assets/images/applets/back.png" >
    </span>

    <span>{{ title }}</span>
  </div>
</template>
<script>
export default {
  props: {
    title: {
      type: String,
      default: ''
    }
  },
  data() {
    return {

    }
  },
  methods: {
    handleClose() {
      this.$router.back(-1)
    }
  }
}
</script>
<style lang="scss" scoped>
.floor-header {
  height: 44px;
  line-height: 44px;
  width: 100%;
  background: #A4151D;
  box-shadow: 0 2px 4px 0 rgba(0,0,0,0.06);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  .back {
    position: absolute;
    left: 12px;
    width: 20px;
    height: 20px;
    top: 5px;
    img {
      width: 100%;
      height: 100%;
    }
  }
}
</style>