<template>
  <div class="base-box background-filter ">
    <div @click="detail" :class="title ? 'head-cont' : ''">
      <div :class="title ? 'base-box-text' : ''" :style="styleText">
        {{ title }}
      </div>
      <slot name="title"></slot>
    </div>
    <slot></slot>
  </div>
</template>
<script>
export default {
  name: "TslCard",
  props: {
    title: {
      type: String,
      default: "",
    },
    styleText: {
      type: String,
      default: "",
    },
  },
  data() {
    return {};
  },
  methods: {
    detail() {
      this.$emit("detail", 3);
    },
  },
};
</script>
<style scoped>
.background-filter {
  backdrop-filter: blur(50px);
  background-color: rgba(0, 0, 0, 0.4);
}

.base-box {
  padding: 0.3rem;
  border-radius: 8px;
}
.base-box .head-cont {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.3rem;
  height: 0.3rem;
}
.base-box .base-box-text {
  font-size: 0.32rem;
  font-weight: 500;
  color: #f0ffff;
  line-height: 0.28rem;
}
</style>
