fix. page api 수정된 구조에 맞춰 코드 수정
This commit is contained in:
@@ -3,7 +3,7 @@ import { templateRegistry } from '#layers/registry'
|
||||
import type {
|
||||
PageDataValue,
|
||||
PageDataTemplate,
|
||||
PageDataTemplateComponent,
|
||||
PageDataComponent,
|
||||
PageDataMetaTag,
|
||||
} from '#layers/types/api/pageData'
|
||||
|
||||
@@ -16,7 +16,7 @@ const props = defineProps<Props>()
|
||||
// 템플릿 레지스트리 타입 캐스팅
|
||||
const registry = templateRegistry as unknown as Record<
|
||||
string,
|
||||
{ component: PageDataTemplateComponent }
|
||||
{ component: PageDataComponent }
|
||||
>
|
||||
|
||||
// 개별 메타 태그 표시 여부 확인
|
||||
@@ -25,7 +25,7 @@ const shouldShowMetaTag = computed(() => props.pageData.meta_tag_type === 2)
|
||||
// 템플릿 표시 여부 확인
|
||||
const isTemplateVisible = (template: PageDataTemplate): boolean => {
|
||||
return Boolean(
|
||||
template?.components_ && Object.keys(template.components_).length > 0
|
||||
template?.components && Object.keys(template.components).length > 0
|
||||
)
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ watchEffect(() => {
|
||||
>
|
||||
<component
|
||||
:is="registry[template.template_code]?.component"
|
||||
:components="template.components_"
|
||||
:components="template.components"
|
||||
/>
|
||||
</template>
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user