feat: add dashbaord cardnum redirect
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user