thainv-dev: fix ui
This commit is contained in:
+17
-1
@@ -1,9 +1,11 @@
|
||||
import { defineStore, acceptHMRUpdate } from "pinia";
|
||||
|
||||
import { useLocalStorage } from "@vueuse/core";
|
||||
export const useDynamicPageStore = defineStore("dynamicPageStore", () => {
|
||||
const currentPage = ref<any>({});
|
||||
const sectionPublished = ref<any[]>([]);
|
||||
const componentPublished = ref<any[]>([]);
|
||||
const step = ref<number>(0)
|
||||
|
||||
|
||||
async function fetchPageByCode(slug: any) {
|
||||
try {
|
||||
@@ -61,16 +63,30 @@ export const useDynamicPageStore = defineStore("dynamicPageStore", () => {
|
||||
setComponentPublished();
|
||||
};
|
||||
|
||||
|
||||
function increaseStep(increase: number) {
|
||||
step.value += increase
|
||||
return step.value
|
||||
}
|
||||
|
||||
function decreaseStep(decrease: number) {
|
||||
step.value -= decrease
|
||||
return step.value
|
||||
}
|
||||
return {
|
||||
currentPage,
|
||||
sectionPublished,
|
||||
componentPublished,
|
||||
step,
|
||||
|
||||
fetchPageByCode,
|
||||
fetchPageById,
|
||||
setSectionPublished,
|
||||
setComponentPublished,
|
||||
setDataQuery,
|
||||
|
||||
increaseStep,
|
||||
decreaseStep,
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user