2024-05-30 18:06:50 +07:00
|
|
|
<script setup lang="ts">
|
2024-06-28 15:39:26 +07:00
|
|
|
import DynamicLayout from '@/components/dynamic-page/page-section/layouts/index.vue';
|
2024-07-01 16:04:16 +07:00
|
|
|
import type { PageSection } from "@/server/models/dynamic-page/index";
|
2024-05-30 18:06:50 +07:00
|
|
|
|
|
|
|
|
const props = defineProps<{
|
|
|
|
|
label?: any
|
|
|
|
|
layout?: string
|
|
|
|
|
settings?: any
|
|
|
|
|
content?: any
|
|
|
|
|
|
2024-06-28 15:39:26 +07:00
|
|
|
section: PageSection
|
2024-05-30 18:06:50 +07:00
|
|
|
}>()
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<section class="section-container">
|
2024-06-28 15:39:26 +07:00
|
|
|
<!-- tạm thời đóng vì đang đẩy vào label -->
|
|
|
|
|
<!-- <h2 class="section__title mb-3" v-if="props.label">{{ props.label || '' }}</h2> -->
|
|
|
|
|
<div class="section_layout">
|
2024-05-30 18:06:50 +07:00
|
|
|
<template v-if="props.layout">
|
|
|
|
|
<DynamicLayout
|
|
|
|
|
:layout="props.layout"
|
|
|
|
|
:content="props.content"
|
|
|
|
|
:settings="props.settings"
|
2024-06-28 15:39:26 +07:00
|
|
|
:section="props.section"
|
2024-05-30 18:06:50 +07:00
|
|
|
/>
|
|
|
|
|
</template>
|
2024-06-28 15:39:26 +07:00
|
|
|
<template v-else>
|
|
|
|
|
<div>
|
|
|
|
|
Bấm để chọn layout
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
2024-05-30 18:06:50 +07:00
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
</template>
|
2024-06-28 15:39:26 +07:00
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.border-pri {
|
|
|
|
|
.section_layout{
|
|
|
|
|
gap: 5px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.section_layout {
|
|
|
|
|
display: grid;
|
|
|
|
|
grid-template-columns: repeat(1, minmax(0, 1fr));
|
|
|
|
|
|
|
|
|
|
.empty {
|
|
|
|
|
min-height: 100px;
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
background: #409eff;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|