<template>
  <section class="AiBadge">
    <slot></slot>
    <sup v-if="isShow" class="badge">
      <span v-if="badge">{{badge}}</span>
      <slot v-else name="badge"></slot>
    </sup>
  </section>

</template>

<script>
  export default {
    name: "AiBadge",
    props: {
      badge: String,
      isShow: {type: Boolean, default: true}
    }
  }
</script>

<style lang="scss" scoped>
  .AiBadge {
    .badge {
      position: absolute;
      margin-left: -10px;
      margin-top: -10px;
    }
  }
</style>
