<template>
  <div class="page-title">
    <div class="title-name">{{ pageTitle }}</div>
  </div>
</template>
<script>
export default {
  name: 'PageTitle',
  props: {
    title: {
      type: String,
      default() {
        return ''
      }
    },
    desc: {
      type: String,
      default() {
        return ''
      }
    }
  },
  computed: {
    pageTitle() {
      return this.title || this.$route.meta.title
    }
  }
}
</script>
<style lang="scss">
.page-title {
  margin-bottom: -28px;
  height: 148px;
  background-image: url(../../assets/image/title_bg.png);
  background-repeat: no-repeat;
  background-position: center;
  background-size: auto 100%;
  display: flex;
  justify-content: center;
  align-content: center;
  .title-name {
    margin: -8px auto 0;
    display: inline-block;
    align-self: center;
    padding: 0 20px;
    font-size: 30px;
    color: #fff;
    letter-spacing: 0;
    text-align: center;
    font-weight: 700;
    position: relative;
    &:before,
    &:after {
      content: '';
      display: block;
      width: 60px;
      height: 2px;
      position: absolute;
      top: 50%;
      margin-top: -1px;
    }
    &:before {
      background-image: linear-gradient(90deg,hsla(0,0%,100%,.06) 12%,#fff 45%);
      left: -60px;
    }
    &:after {
      background-image: linear-gradient(270deg,hsla(0,0%,100%,.06) 12%,#fff 45%);
      right: -60px;
    }
  }
}
</style>
