2025-04-30 06:53:42 +00:00
|
|
|
<template>
|
2025-05-13 08:19:21 +00:00
|
|
|
<div class="content-container">
|
2025-04-30 06:53:42 +00:00
|
|
|
<div class="content-container__header flex align-center w-full" v-if="slots.header || header">
|
|
|
|
|
<slot name="backButton">
|
|
|
|
|
<back-button :to="backTo" v-if="showBack"></back-button>
|
|
|
|
|
</slot>
|
2025-05-13 08:19:21 +00:00
|
|
|
<div class="flex-between w-full">
|
|
|
|
|
<slot name="header">
|
|
|
|
|
<h4>{{ header }}</h4>
|
|
|
|
|
</slot>
|
2025-05-29 10:41:44 +00:00
|
|
|
<slot name="search"> </slot>
|
2025-05-13 08:19:21 +00:00
|
|
|
</div>
|
2025-04-30 06:53:42 +00:00
|
|
|
</div>
|
2025-06-24 08:53:58 +00:00
|
|
|
|
|
|
|
|
<div class="content-container__main">
|
|
|
|
|
<el-scrollbar class="p-16" style="padding-right: 0;">
|
2025-06-19 09:10:39 +00:00
|
|
|
<slot></slot>
|
2025-06-24 08:53:58 +00:00
|
|
|
</el-scrollbar>
|
|
|
|
|
</div>
|
2025-04-30 06:53:42 +00:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { computed, useSlots } from 'vue'
|
|
|
|
|
defineOptions({ name: 'ContentContainer' })
|
|
|
|
|
const slots = useSlots()
|
|
|
|
|
const props = defineProps({
|
|
|
|
|
header: String || null,
|
2025-05-08 08:23:03 +00:00
|
|
|
backTo: String,
|
2025-04-30 06:53:42 +00:00
|
|
|
})
|
|
|
|
|
const showBack = computed(() => {
|
|
|
|
|
const { backTo } = props
|
|
|
|
|
return backTo
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.content-container {
|
|
|
|
|
transition: 0.3s;
|
|
|
|
|
.content-container__header {
|
|
|
|
|
box-sizing: border-box;
|
2025-05-13 08:19:21 +00:00
|
|
|
padding: calc(var(--app-base-px) * 2) calc(var(--app-base-px) * 2) 0;
|
2025-04-30 06:53:42 +00:00
|
|
|
flex-wrap: wrap;
|
|
|
|
|
}
|
|
|
|
|
.content-container__main {
|
|
|
|
|
box-sizing: border-box;
|
2025-05-07 07:58:42 +00:00
|
|
|
min-width: 447px;
|
2025-04-30 06:53:42 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|