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
@@ -27,12 +27,12 @@ const definedDynamicPageLayout: Record<string, any> = {
'ARTICLE_LONG': ARTICLE_LONG_LAYOUT,
}
const getCurrentLayout = computed(() => _props.settings && _props.settings.layout);
const getCurrentLayout = computed(() => _props.settings.layout);
const GET_PROPS = computed(() => {
return () => {
let props: any = {};
for (const [key, value] of _props.settings ? Object.entries(_props.settings) : []) {
for (const [key, value] of Object.entries(_props.settings)) {
props = {
...props,
[key]: value
@@ -44,7 +44,7 @@ const GET_PROPS = computed(() => {
</script>
<template>
<component :is="definedDynamicPageLayout[getCurrentLayout] || null" v-bind="GET_PROPS()">
<component :is="definedDynamicPageLayout[getCurrentLayout]" v-bind="GET_PROPS()">
<slot />
</component>
</template>