@fy-/fws-vue 2.0.20 → 2.0.21
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 +15 -4
- package/package.json +1 -1
package/composables/seo.ts
CHANGED
|
@@ -122,9 +122,8 @@ export const useSeo = (seoData: Ref<LazyHead>, initial: boolean = false) => {
|
|
|
122
122
|
} else {
|
|
123
123
|
return seoData.value.image.replace("?vars=", ".png?vars=");
|
|
124
124
|
}
|
|
125
|
-
} else if (seoData.value.image) {
|
|
126
|
-
return seoData.value.image;
|
|
127
125
|
}
|
|
126
|
+
return seoData.value.image;
|
|
128
127
|
},
|
|
129
128
|
ogImageUrl: () => {
|
|
130
129
|
if (seoData.value.image && seoData.value.image.includes("?vars=")) {
|
|
@@ -136,9 +135,8 @@ export const useSeo = (seoData: Ref<LazyHead>, initial: boolean = false) => {
|
|
|
136
135
|
} else {
|
|
137
136
|
return seoData.value.image.replace("?vars=", ".png?vars=");
|
|
138
137
|
}
|
|
139
|
-
} else if (seoData.value.image) {
|
|
140
|
-
return seoData.value.image;
|
|
141
138
|
}
|
|
139
|
+
return seoData.value.image;
|
|
142
140
|
},
|
|
143
141
|
ogImageType: () => {
|
|
144
142
|
if (seoData.value.imageType) {
|
|
@@ -148,6 +146,19 @@ export const useSeo = (seoData: Ref<LazyHead>, initial: boolean = false) => {
|
|
|
148
146
|
}
|
|
149
147
|
return undefined;
|
|
150
148
|
},
|
|
149
|
+
twitterImageUrl: () => {
|
|
150
|
+
if (seoData.value.image && seoData.value.image.includes("?vars=")) {
|
|
151
|
+
if (seoData.value.imageType) {
|
|
152
|
+
return seoData.value.image.replace(
|
|
153
|
+
"?vars=",
|
|
154
|
+
`.${seoData.value.imageType}?vars=`,
|
|
155
|
+
);
|
|
156
|
+
} else {
|
|
157
|
+
return seoData.value.image.replace("?vars=", ".png?vars=");
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return seoData.value.image;
|
|
161
|
+
},
|
|
151
162
|
twitterImageType() {
|
|
152
163
|
if (seoData.value.imageType) {
|
|
153
164
|
return seoData.value.imageType
|