feat: new layout

This commit is contained in:
MoreStrive
2024-06-28 15:39:26 +07:00
parent ab3419bd5f
commit ad962eda86
134 changed files with 4977 additions and 2985 deletions
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { enumPageComponentTemplates, enumPageComponentLayouts } from "@/definitions/enum";
import { enumPageComponentTemplate, enumPageComponentKey, enumPageComponentLayouts } from "@/definitions/enum";
import { Article_Pagination } from "./index";
const _props = defineProps<{
@@ -8,10 +8,10 @@ const _props = defineProps<{
}>();
const definedDynamicComponent: Record<string, any> = {
'TYPE:Article-LAYOUT:horizontal-DATA:HORIZONTAL': Article_Pagination
[enumPageComponentTemplate[enumPageComponentKey.SECTION]['ARTICLE']]: Article_Pagination,
};
const getCurrentComponent = computed(() => `${_props.settings.layout}`);
const getCurrentComponent = computed(() => _props.settings.template);
const GET_PROPS = computed(() => {
return () => {
@@ -30,5 +30,8 @@ const GET_PROPS = computed(() => {
</script>
<template>
<component :is="definedDynamicComponent[getCurrentComponent]" v-bind="{ ...GET_PROPS(), component: _props.component, settings: _props.settings }" />
<component
:is="definedDynamicComponent[getCurrentComponent]"
v-bind="{ ...GET_PROPS(), component: _props.component, settings: _props.settings }"
/>
</template>