@fy-/fws-vue 2.1.24 → 2.1.25

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.
@@ -78,18 +78,17 @@ function page(page: number): RouteLocationRaw {
78
78
  function checkPageNumber(page: number = 1) {
79
79
  prevNextSeo.value.next = undefined
80
80
  prevNextSeo.value.prev = undefined
81
- const pagePlus = page + 1
82
- const pageMinus = page - 1
81
+
83
82
  if (hasFW()) {
84
83
  const url = getURL()
85
- if (pagePlus <= props.items.page_max && url) {
84
+ if (page + 1 <= props.items.page_max && url) {
86
85
  prevNextSeo.value.next
87
- = `${url.Scheme}://${url.Host}${route.path}?page=${pagePlus}${
86
+ = `${url.Scheme}://${url.Host}${url.Path}?page=${page + 1}${
88
87
  props.hash !== '' ? `#${props.hash}` : ''}`
89
88
  }
90
- if (pageMinus >= 1 && url) {
89
+ if (page - 1 >= 1 && url) {
91
90
  prevNextSeo.value.prev
92
- = `${url.Scheme}://${url.Host}${route.path}?page=${pageMinus}${
91
+ = `${url.Scheme}://${url.Host}${url.Path}?page=${page - 1}${
93
92
  props.hash !== '' ? `#${props.hash}` : ''}`
94
93
  }
95
94
  }
@@ -110,23 +109,23 @@ onUnmounted(() => {
110
109
  })
111
110
 
112
111
  checkPageNumber(props.items.page_no)
112
+
113
113
  useServerHead({
114
114
  link: computed(() => {
115
115
  const result: any = []
116
+ checkPageNumber(props.items.page_no)
116
117
  if (prevNextSeo.value.next) {
117
118
  result.push({
118
119
  href: prevNextSeo.value.next,
119
120
  rel: 'next',
120
- key: 'next',
121
- hid: 'paging-next',
121
+ key: 'paging-next',
122
122
  })
123
123
  }
124
124
  if (prevNextSeo.value.prev) {
125
125
  result.push({
126
126
  href: prevNextSeo.value.prev,
127
127
  rel: 'prev',
128
- key: 'prev',
129
- hid: 'paging-prev',
128
+ key: 'paging-prev',
130
129
  })
131
130
  }
132
131
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fy-/fws-vue",
3
- "version": "2.1.24",
3
+ "version": "2.1.25",
4
4
  "author": "Florian 'Fy' Gasquez <m@fy.to>",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/fy-to/FWJS#readme",