42 lines
1.0 KiB
Vue
42 lines
1.0 KiB
Vue
<script setup lang="ts">
|
|
import { ArrowLeftIcon } from 'tdesign-icons-vue-next'
|
|
|
|
defineProps<{
|
|
title: string
|
|
backIcon?: boolean
|
|
}>()
|
|
const slots = defineSlots<{
|
|
default: any
|
|
'action-area': any
|
|
'search-area': any
|
|
'back-icon': any
|
|
}>()
|
|
</script>
|
|
|
|
<template>
|
|
<TCard class="w-full min-h-full" :bordered="false" :header-bordered="true">
|
|
<template #header>
|
|
<div class="flex items-center gap-2">
|
|
<slot v-if="backIcon || slots['back-icon']" name="back-icon">
|
|
<TButton variant="text" size="small" @click="$router.back()">
|
|
<ArrowLeftIcon size="20"></ArrowLeftIcon>
|
|
</TButton>
|
|
</slot>
|
|
|
|
<div class="text-lg">{{ title }}</div>
|
|
</div>
|
|
</template>
|
|
<TSpace v-if="slots['action-area']" class="mb-6">
|
|
<slot name="action-area"> </slot>
|
|
</TSpace>
|
|
<div v-if="slots['search-area']" class="w-full mb-6 py-6">
|
|
<slot name="search-area"></slot>
|
|
</div>
|
|
<div class="w-full h-full overflow-hidden">
|
|
<slot> </slot>
|
|
</div>
|
|
</TCard>
|
|
</template>
|
|
|
|
<style scoped></style>
|