<template>
  <div class="bf-header">
    <div class="left">
      <div class="left_el"></div>
      <p>{{headerName}}</p>
    </div>
    <div class="right">
      <Search class="collection">
        <button @click="newAdd" class="btnAdd">{{ msgType===1?'新增':'新增' }}</button>
      </Search>
    </div>
  </div>
</template>
<script>
import Search from '../../components/Search/index.vue'
export default {
  props: ['headerName'],
  data () {
    return {
      msgType: 1
      // headerName: ''
    }
  },
  methods: {
    newAdd () {
      this.$emit('newAdd')
    }
  },
  components: {
    Search
  }
}
</script>
<style lang="scss">
.bf-header {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-between;
  > .left {
    width: 20%;
    height: 100%;
    display: flex;
    align-items: center;
    > .left_el {
      width: 4px;
      height: 26px;
      background: #6e82a7;
    }
    > p {
      width: 143px;
      height: 24px;
      font-size: 24px;
      font-family: Microsoft YaHei;
      font-weight: bold;
      color: #303133;
      margin-left: 12px;
      white-space: nowrap;
    }
  }
  > .right {
    height: 100%;
    display: flex;
    align-items: center;
  }
}
</style>