thainv-dev: fix

This commit is contained in:
nguyen van thai
2024-05-31 15:31:05 +07:00
parent 892bddde2f
commit c5887d911f
12 changed files with 143 additions and 59 deletions
+2 -3
View File
@@ -27,13 +27,12 @@ export const useDynamicPageStore = defineStore("dynamicPageStore", () => {
contentArr.push(section.content && typeof section.content === 'string' && JSON.parse(section.content));
return section;
});
console.log(currentPage.value.sections ,'sectionPublished 2')
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)
);
console.log(sectionPublished.value ,'sectionPublished')
};
const setComponentPublished = () => {
@@ -43,7 +42,7 @@ export const useDynamicPageStore = defineStore("dynamicPageStore", () => {
return section;
});
componentPublished.value = currentPage.value.components && currentPage.value.components.filter((section: any) => section.isPublished);
console.log(componentPublished.value, 'componentPublished2')
};
const setDataQuery = (query: any, componentId: number | string) => {