@fy-/fws-vue 2.1.33 → 2.1.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4,7 +4,7 @@ import type { RouteLocationRaw } from 'vue-router'
|
|
|
4
4
|
import type { APIPaging } from '../../composables/rest'
|
|
5
5
|
import { getURL, hasFW } from '@fy-/fws-js'
|
|
6
6
|
import { ChevronLeftIcon, ChevronRightIcon } from '@heroicons/vue/24/solid'
|
|
7
|
-
import {
|
|
7
|
+
import { useServerHead } from '@unhead/vue'
|
|
8
8
|
import { computed, onMounted, ref, watch } from 'vue'
|
|
9
9
|
import { useRoute } from 'vue-router'
|
|
10
10
|
import { useEventBus } from '../../composables/event-bus'
|
|
@@ -81,7 +81,6 @@ pageWatcher.value = watch(
|
|
|
81
81
|
// Compute pagination links for useHead
|
|
82
82
|
const paginationLinks = computed(() => {
|
|
83
83
|
const result: any[] = []
|
|
84
|
-
const page = Number(props.items.page_no)
|
|
85
84
|
const page_max = Number(props.items.page_max)
|
|
86
85
|
|
|
87
86
|
let next
|
|
@@ -99,6 +98,8 @@ const paginationLinks = computed(() => {
|
|
|
99
98
|
currentQuery[key] = value
|
|
100
99
|
})
|
|
101
100
|
// Remove the existing 'page' parameter to avoid duplicates
|
|
101
|
+
const page = Number(currentQuery.page)
|
|
102
|
+
|
|
102
103
|
delete currentQuery.page
|
|
103
104
|
|
|
104
105
|
const hashPart = props.hash !== '' ? `#${props.hash}` : ''
|
|
@@ -140,7 +141,7 @@ const paginationLinks = computed(() => {
|
|
|
140
141
|
})
|
|
141
142
|
|
|
142
143
|
// Use useHead outside of any reactive context to ensure it runs during SSR
|
|
143
|
-
|
|
144
|
+
useServerHead({
|
|
144
145
|
link: paginationLinks.value,
|
|
145
146
|
})
|
|
146
147
|
|