2024-05-30 18:06:50 +07:00
|
|
|
<script setup lang="ts">
|
|
|
|
|
const props = defineProps<{
|
|
|
|
|
layout?: any
|
|
|
|
|
}>()
|
|
|
|
|
|
|
|
|
|
const CLASS_FOR_LAYOUT = computed(() => {
|
|
|
|
|
let _classForLayout = {};
|
|
|
|
|
switch (props.layout) {
|
|
|
|
|
case 'Full_Page':
|
|
|
|
|
_classForLayout = {
|
2024-05-30 22:42:55 +07:00
|
|
|
page_container: 'page_container w-full px-2',
|
2024-05-30 21:32:51 +07:00
|
|
|
layout_container: 'layout_container px-5',
|
2024-05-30 18:06:50 +07:00
|
|
|
};
|
|
|
|
|
break;
|
|
|
|
|
case 'Center_Page':
|
|
|
|
|
_classForLayout = {
|
2024-05-30 22:42:55 +07:00
|
|
|
page_container: 'page_container w-full px-2',
|
2024-05-30 21:32:51 +07:00
|
|
|
layout_container: 'layout_container container mx-auto',
|
2024-05-30 18:06:50 +07:00
|
|
|
};
|
|
|
|
|
break;
|
|
|
|
|
case 'Background_Page':
|
|
|
|
|
_classForLayout = {
|
2024-05-30 21:32:51 +07:00
|
|
|
page_container: 'page_container w-full background-container',
|
|
|
|
|
layout_container: 'layout_container container mx-auto',
|
2024-05-30 18:06:50 +07:00
|
|
|
};
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
_classForLayout = {
|
2024-05-30 22:42:55 +07:00
|
|
|
page_container: 'page_container px-2',
|
2024-05-30 18:06:50 +07:00
|
|
|
layout_container: 'layout_container',
|
|
|
|
|
};
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return _classForLayout;
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<div :class="[CLASS_FOR_LAYOUT.page_container]">
|
2024-05-30 21:32:51 +07:00
|
|
|
<div :class="[CLASS_FOR_LAYOUT.layout_container]" class="grid-container grid grid-cols-1 gap-20 style_layout">
|
2024-05-30 18:06:50 +07:00
|
|
|
<slot />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
|
|
|
|
|
</style>
|