| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <template>
- <div class="mb-h5-user-item">
- <img :src="src" class="mb-user1-img" alt="user" />
- <div class="mb-user1-text">{{ text }}</div>
- <img v-if="tailSrc" class="mb-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>
- .mb-h5-user-item {
- position: relative;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- .mb-user1-img {
- width: 22px;
- }
- .mb-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;
- }
- .mb-user-tail {
- position: absolute;
- width: 3px;
- height: 30px;
- top: 100%;
- right: 48%;
- transform: translateX(-50%);
- pointer-events: none;
- z-index: 0;
- }
- }
- </style>
|