mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-13 00:48:36 +01:00
new selfhosted version
This commit is contained in:
33
dashboard/components/complex/line-data/LineDataCard.vue
Normal file
33
dashboard/components/complex/line-data/LineDataCard.vue
Normal file
@@ -0,0 +1,33 @@
|
||||
<script lang="ts" setup>
|
||||
export type LineDataCardProps = {
|
||||
title: string,
|
||||
sub: string,
|
||||
action?: Component,
|
||||
actionProps?: Record<string, any>
|
||||
}
|
||||
|
||||
const props = defineProps<{ data: LineDataCardProps }>();
|
||||
|
||||
const emits = defineEmits<{
|
||||
(event: 'showMore'): void
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle>
|
||||
{{ data.title }}
|
||||
</CardTitle>
|
||||
<CardDescription>
|
||||
{{ data.sub }}
|
||||
</CardDescription>
|
||||
<CardAction v-if="data.action" class="flex items-center">
|
||||
<component :data="data.actionProps" :is="data.action"></component>
|
||||
</CardAction>
|
||||
</CardHeader>
|
||||
<CardContent class="h-full">
|
||||
<slot></slot>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</template>
|
||||
Reference in New Issue
Block a user