<template>
  <div class="page-header">
    <el-button type="text" icon="el-icon-arrow-left" @click="goBack">返回</el-button>
    <span class="page-title">{{ title }}</span>
  </div>
</template>

<script>
export default {
  name: 'GoBack',
  props: {
    title: {
      type: String,
      default: '',
    },
  },
  methods: {
    goBack() {
      this.$emit('goBack')
    },
  },
}
</script>

<style scoped lang="scss">
.page-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e6e6e6;

  .page-title {
    font-size: 18px;
    font-weight: 600;
    margin-left: 10px;
    color: #303133;
  }
}
</style>
