<template>
  <div class="v-header">
    <div class="v-left-text">
      <template v-if="/^iconfont\/.*/.test($route.meta.icon)">
        <i class="iconfont" :class="$route.meta.icon.replace(/^iconfont\//,'')" style="padding: 0 6px;"></i>
      </template>
      <template v-else-if="/^el-icon.*/.test($route.meta.icon)">
        <i :class="$route.meta.icon" style="padding: 0 6px;"></i>
      </template>
      <template v-else>
        <Icon size="20" :type="$route.meta.icon" />
      </template>
      <span>{{text || $route.meta.title}}</span>
    </div>
    <div class="content">
      <slot name="content"></slot>
    </div>
    <!--  <div class="v-right-content">
        <slot></slot>
      </div> -->
    <div class="selerchcontent">
      <slot ></slot>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    icon: String,
    text: String
  },
};
</script>
<style lang="less" scoped>
.v-header {
  display: flex;
  border-bottom: 1px solid #dcdee2;
  flex-direction: column;
  .v-left-text {
    margin-top: 3px;
    padding-bottom: 6px;
    // padding-top: 10px;
    font-weight: bold;
    font-size: 15px;
    color: #0077CC;
    white-space: nowrap;
    border-bottom: 2px solid #0077CC;
    > span {
      position: relative;

    }
  }
  .content {
    line-height: 25px;
    padding-left: 10px;
    padding: 6px 0 0 10px;
  }
  .v-right-content {
    flex: 1;
  }

  .selerchcontent{
    flex: 1;
  }
}
</style>
