@fy-/fws-vue 1.7.6 → 1.7.8
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.
- package/composables/seo.ts +7 -10
- package/package.json +1 -1
package/composables/seo.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
1
|
import type { Ref } from "vue";
|
|
3
|
-
import {
|
|
4
|
-
import { computed } from "vue";
|
|
2
|
+
import { useHead } from "@unhead/vue";
|
|
5
3
|
import { getURL, getLocale, getPrefix } from "@fy-/fws-js";
|
|
6
4
|
import { useRoute } from "vue-router";
|
|
7
5
|
|
|
@@ -32,10 +30,9 @@ export const useSeo = (seo: Ref<LazyHead>, initial: boolean = false) => {
|
|
|
32
30
|
const route = useRoute();
|
|
33
31
|
const currentLocale = seo.value.locale || getLocale();
|
|
34
32
|
|
|
35
|
-
|
|
36
|
-
title:
|
|
37
|
-
|
|
38
|
-
links: computed(() => {
|
|
33
|
+
useHead({
|
|
34
|
+
title: () => seo.value.title || "",
|
|
35
|
+
link: () => {
|
|
39
36
|
const links = [];
|
|
40
37
|
|
|
41
38
|
["prev", "next"].forEach((rel) => {
|
|
@@ -70,8 +67,8 @@ export const useSeo = (seo: Ref<LazyHead>, initial: boolean = false) => {
|
|
|
70
67
|
});
|
|
71
68
|
|
|
72
69
|
return links;
|
|
73
|
-
}
|
|
74
|
-
|
|
70
|
+
},
|
|
71
|
+
meta: () => {
|
|
75
72
|
const metas = [];
|
|
76
73
|
|
|
77
74
|
metas.push(
|
|
@@ -141,6 +138,6 @@ export const useSeo = (seo: Ref<LazyHead>, initial: boolean = false) => {
|
|
|
141
138
|
}
|
|
142
139
|
|
|
143
140
|
return metas;
|
|
144
|
-
}
|
|
141
|
+
},
|
|
145
142
|
});
|
|
146
143
|
};
|