feat: uptime tooltip refactor

This commit is contained in:
Alisa | Side.one 2023-05-12 22:03:06 +08:00
parent 2d4720bc9b
commit ad4ad7bdee
2 changed files with 12 additions and 16 deletions

View File

@ -1,5 +1,5 @@
<script lang="ts" setup>
import { getLogo, useDashboard } from '@/stores/useDashboard';
import { useDashboard } from '@/stores/useDashboard';
import { computed } from 'vue';
import { Icon } from '@iconify/vue';

View File

@ -23,20 +23,16 @@ const bars = computed(() => {
});
</script>
<template>
<div class="flex items-center justify-evenly">
<span
v-for="(b, i) in bars"
:key="i"
:class="b.color"
class="rounded"
style="width: 1.5%"
>&nbsp;
<v-tooltip
v-if="Number(b.height) > 0"
activator="parent"
location="top"
>{{ b.height }}</v-tooltip
>
</span>
<div class="d-flex items-center justify-evenly">
<div class="cursor-default" v-for="(item, index) in bars" :key="index">
<div class="tooltip" :data-tip="item.height">
<span
:class="item.color"
class="rounded"
style="width: 1.5%"
>&nbsp;
</span>
</div>
</div>
</div>
</template>