Some checks failed
🚀 Deploy - Demo / deployment (push) Has been cancelled
- 웹훅 URL을 https://admin.youtooplay.com/webhook로 변경 - Nginx 리버스 프록시 설정 파일 추가 - 배포 가이드 업데이트
49 lines
1.2 KiB
Vue
49 lines
1.2 KiB
Vue
<script setup lang="ts">
|
|
interface Props {
|
|
title: string
|
|
color?: string
|
|
icon: string
|
|
stats: number
|
|
change: number
|
|
}
|
|
|
|
const props = withDefaults(defineProps<Props>(), {
|
|
color: 'primary',
|
|
})
|
|
|
|
const isPositive = controlledComputed(() => props.change, () => Math.sign(props.change) === 1)
|
|
</script>
|
|
|
|
<template>
|
|
<VCard>
|
|
<VCardText class="d-flex align-center">
|
|
<VAvatar
|
|
size="44"
|
|
rounded
|
|
:color="props.color"
|
|
variant="tonal"
|
|
class="me-4"
|
|
>
|
|
<VIcon
|
|
:icon="props.icon"
|
|
size="30"
|
|
/>
|
|
</VAvatar>
|
|
|
|
<div>
|
|
<span class="text-caption">{{ props.title }}</span>
|
|
<div class="d-flex align-center flex-wrap">
|
|
<span class="text-h6 font-weight-semibold">{{ kFormatter(props.stats) }}</span>
|
|
<div
|
|
v-if="props.change"
|
|
:class="`${isPositive ? 'text-success' : 'text-error'} mt-1`"
|
|
>
|
|
<VIcon :icon="isPositive ? 'bx-chevron-up' : 'bx-chevron-down'" />
|
|
<span class="text-caption font-weight-semibold">{{ Math.abs(props.change) }}%</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</VCardText>
|
|
</VCard>
|
|
</template>
|