<template>
  <div v-if="type == 'short'" class="title short">{{ text }}</div>
  <div v-else class="title long">{{ text }}</div>
</template>
<script>
export default {
  name: "Title",
  props: {
    type: {
      type: String,
      default: "short",
    },
    text: {
      type: String,
      default: "",
    },
  },
};
</script>
<style lang="less" scoped>
.title {
  margin-bottom: 8px;
  height: 50px;
  line-height: 50px;
  width: 100%;
  text-align: center;
  font-size: 20px;
  font-family: Microsoft YaHei;
  font-weight: bold;
  color: #ffffff;
  letter-spacing: 2px;
}
.short {
  background: url("@/assets/title-short.png") no-repeat;
  background-size: 100% 100%;
}
.long {
  background: url("@/assets/title-long.png") no-repeat;
  background-size: 100% 100%;
}
</style>