123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <template>
- <div class="hover-tip">
- <img :src="icon" alt="" />
- <span>{{ txt }}</span>
- <img :src="require('@/assets/svg/icon-tip-arrow.svg')" alt="" class="arrow" />
- </div>
- </template>
- <script setup>
- import { defineProps } from 'vue'
- defineProps({
- txt: {
- type: String,
- default: ''
- },
- icon: {
- type: String,
- default: require('@/assets/svg/icon-green-yes.svg')
- }
- })
- </script>
- <style lang="scss">
- .hover-tip {
- width: fit-content;
- height: 20px;
- line-height: 20px;
- padding: 0 7px;
- background: rgba(0, 0, 0, 0.6);
- border-radius: 3px;
- display: flex;
- align-items: center;
- position: relative;
- margin-bottom: 5px;
- position: absolute;
- top: -20px;
- img {
- width: 12px;
- height: 12px;
- }
- span {
- margin-left: 4px;
- font-weight: 500;
- font-size: 12px;
- color: #FFFFFF;
- }
- .arrow {
- position: absolute;
- width: 9px;
- height: 5px;
- bottom: -5px;
- left: 50%;
- margin-left: -4.5px;
- }
- }
- </style>
|