feat: add dashbaord cardnum redirect

This commit is contained in:
engigu
2025-09-28 21:22:05 +08:00
parent 3217d00bee
commit 7a8c6c4ce5
3 changed files with 77 additions and 11 deletions
+12 -2
View File
@@ -1,5 +1,5 @@
<template>
<Card class="w-full">
<Card class="w-full cursor-pointer hover:shadow-md transition-shadow duration-200" @click="handleClick">
<CardHeader class="flex flex-row items-center justify-between space-y-0 pb-2">
<CardTitle class="text-sm font-medium text-muted-foreground">
{{ title }}
@@ -16,13 +16,23 @@
<script setup lang="ts">
import { Card, CardHeader, CardTitle, CardContent } from "@/components/ui/card"
import type { Component } from 'vue'
import { useRouter } from 'vue-router'
defineProps<{
const router = useRouter()
const props = defineProps<{
title: string
value: string | number
description?: string
icon?: Component
routePath?: string
}>()
const handleClick = () => {
if (props.routePath) {
router.push(props.routePath)
}
}
</script>
<script lang="ts">