minhnt-dev: dynamic section

This commit is contained in:
MoreStrive
2024-06-04 09:59:12 +07:00
parent 45cd7780d6
commit 4d239e9f32
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ watch(currentPage, () => {
}, { deep: true })
useHead({
title: currentPage.value.title || ''
title: () => currentPage.value.title || ''
})
</script>
+1 -1
View File
@@ -33,7 +33,7 @@ export const useDynamicPageStore = defineStore("dynamicPageStore", () => {
sectionPublished.value = currentPage.value.sections && currentPage.value.sections.filter(
(section: any) => section.isPublished && !contentArr.flat().some((_section: any) => _section && _section.data && _section.type === "section" && section.id === _section.data)
).sort((a, b) => a.order - b.order);
).sort((a: any, b: any) => a.order - b.order);
};