<template>
  <div class="h5-user-item">
    <img width="22" :src="src" class="user1-img" alt="user" />
    <div class="user1-text">{{ text }}</div>
    <img v-if="tailSrc" class="user-tail" :src="tailSrc" alt="user" aria-hidden="true" />
  </div>
</template>
<script setup>
import defaultUserSrc from '~/assets/svg/home/user1.svg'

const props = defineProps({
  text: {
    type: String,
    default: "正常访客",
    required: true,
  },
  src: {
    type: String,
    default: defaultUserSrc,
    required: true,
  },
  tailSrc: {
    type: String,
    default: "",
  },
});
</script>
<style lang="scss" scoped>
.h5-user-item {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;


  .user1-text {
    display: flex;
    width: 46PX;
    height: 15PX;
    justify-content: center;
    align-items: center;
    align-self: stretch;
    border-radius: 4PX;
    border: 1PX solid #A39DFF;
    background: #3F337D;
    color: #FFF;
    font-size: 10PX;
    font-weight: 400;
    line-height: 10PX;
  }

  .user-tail {
    position: absolute;
    width: 3PX;
    height: 30PX;
    top: 100%;
    right: 48%;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 0;
  }
}
</style>
