<template>
  <div :class="noBg ? 'no-bg' : ''" class="title">
    <div class="text">
      <span class="txt">{{ text }}</span>
      <slot name="time"></slot>
    </div>
    <slot name="info"></slot>
  </div>
</template>

<script>
export default {
  name: "Title",
  props: {
    text: {
      type: String,
      default: "",
    },
    noBg: {
      type: Boolean,
      default: false,
    },
  },
};
</script>

<style lang="scss" scoped>
.title {
  // width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 30px;
  padding: 7px 0px 5px 34px;
  background: url(@/assets/images/shuju/overview/title-small-bg.png) no-repeat;
  //background-size: 100% 100%;

  .text {
    font-family: PingFang SC;
    font-size: 18px;
    font-weight: 400;
    position: relative;
    z-index: 2;
    color: #fff;
    -webkit-background-clip: text;
    display: flex;
    align-items: center;
    .txt {
      margin-right: 20px;
    }
  }
}

.no-bg {
  background: none;
}
</style>
  