<template>
  <div class="introduce-title">
    <span class="main-title" v-if="!isSlot">{{ title }}</span>
    <slot></slot>
  </div>
</template>

<script>
export default {
  props: {
    title: {
      type: String,
      default: "标题",
    },
    isSlot: {
      type: Boolean,
      default: false,
    },
  },
  data() {
    return {};
  },
};
</script>

<style lang="scss" scoped>
.introduce-title {
  height: 40px;
  background: url("~@/assets/images/ui/user_title.png");
  background-size: 100% 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
  padding: 0 20px 0 40px;
  .main-title {
    font-size: 19px;
    color: #ffffff;
    font-family: "xiniu";
    background: linear-gradient(0deg, #00beff 0%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}
</style>
