+
diff --git a/components/dynamic-page/page-component/templates/other/copyLinks/ArticleButton.vue b/components/dynamic-page/page-component/templates/other/copyLinks/ArticleButton.vue
index 683a151..749baf7 100644
--- a/components/dynamic-page/page-component/templates/other/copyLinks/ArticleButton.vue
+++ b/components/dynamic-page/page-component/templates/other/copyLinks/ArticleButton.vue
@@ -3,6 +3,17 @@ const isBookmark = ref(false)
const onClickBookmark = () => {
isBookmark.value = !isBookmark.value
}
+async function copyLink() {
+ try {
+ const url = window.location.href
+ await navigator.clipboard.writeText(url)
+ alert('copy link thành công')
+
+ } catch (error) {
+ alert(error)
+ }
+
+}
@@ -17,7 +28,7 @@ const onClickBookmark = () => {
-
+
diff --git a/components/dynamic-page/page-component/templates/other/details/default.vue b/components/dynamic-page/page-component/templates/other/details/default.vue
index fb33191..2ceadb5 100644
--- a/components/dynamic-page/page-component/templates/other/details/default.vue
+++ b/components/dynamic-page/page-component/templates/other/details/default.vue
@@ -1,15 +1,19 @@
diff --git a/components/dynamic-page/page-component/templates/other/details/emagazine.vue b/components/dynamic-page/page-component/templates/other/details/emagazine.vue
index b68c0d7..f2a49e2 100644
--- a/components/dynamic-page/page-component/templates/other/details/emagazine.vue
+++ b/components/dynamic-page/page-component/templates/other/details/emagazine.vue
@@ -1,16 +1,23 @@
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/components/dynamic-page/page-component/templates/other/details/infographics.vue b/components/dynamic-page/page-component/templates/other/details/infographics.vue
index ca2c73f..ccd0384 100644
--- a/components/dynamic-page/page-component/templates/other/details/infographics.vue
+++ b/components/dynamic-page/page-component/templates/other/details/infographics.vue
@@ -1,22 +1,24 @@
diff --git a/stores/dynamic-page.ts b/stores/dynamic-page.ts
index ac4dc4e..78f9665 100644
--- a/stores/dynamic-page.ts
+++ b/stores/dynamic-page.ts
@@ -1,9 +1,11 @@
import { defineStore, acceptHMRUpdate } from "pinia";
-
+import { useLocalStorage } from "@vueuse/core";
export const useDynamicPageStore = defineStore("dynamicPageStore", () => {
const currentPage = ref({});
const sectionPublished = ref([]);
const componentPublished = ref([]);
+ const step = ref(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,
};
});