Files
Aether/frontend/src/components/ui/table-card.vue
2025-12-10 20:52:44 +08:00

35 lines
800 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<Card class="overflow-hidden">
<!-- 标题和操作栏 -->
<div v-if="$slots.header || title" class="px-6 py-3.5 border-b border-border/60">
<slot name="header">
<div class="flex items-center justify-between gap-4">
<!-- 左侧标题 -->
<h3 class="text-base font-semibold">{{ title }}</h3>
<!-- 右侧操作区 -->
<div v-if="$slots.actions" class="flex items-center gap-2">
<slot name="actions" />
</div>
</div>
</slot>
</div>
<!-- 表格内容 -->
<slot />
<!-- 分页 -->
<slot name="pagination" />
</Card>
</template>
<script setup lang="ts">
import { Card } from '@/components/ui'
interface Props {
title?: string
}
defineProps<Props>()
</script>