<template>
  <div class="content1" :style="{marginTop:`${statusBarHeight}px`}">
    <div class="wrap1">
      <slot name="left"></slot>
    </div>
    <div class="wrap2">{{title}}</div>
    <div class="wrap3"></div>
  </div>
</template>
<script>
export default {
  name: "title-block",
  data() {
    return {
      statusBarHeight: uni.getSystemInfoSync().statusBarHeight + 4
    };
  },
  props: {
    title: String
  }
};
</script>
<style scoped lang="scss">
.content1 {
  display: flex;

  .wrap1 {
    flex-grow: 1;
    flex-basis: 0;
  }
  .wrap3 {
    flex-grow: 1;
    flex-basis: 0;
  }
  .wrap2 {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    color: #4e964d;
    font-size: 32rpx;
  }
}
</style>
