@fy-/fws-vue 0.7.8 → 0.8.0
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.
|
@@ -45,7 +45,7 @@ const next = () => {
|
|
|
45
45
|
|
|
46
46
|
history.push({
|
|
47
47
|
path: history.currentRoute.path,
|
|
48
|
-
query: { page: page.toString() },
|
|
48
|
+
query: { page: page.toString(), ...route.query },
|
|
49
49
|
hash: props.hash != "" ? props.hash : undefined,
|
|
50
50
|
});
|
|
51
51
|
};
|
|
@@ -55,16 +55,7 @@ const prev = () => {
|
|
|
55
55
|
|
|
56
56
|
history.push({
|
|
57
57
|
path: history.currentRoute.path,
|
|
58
|
-
query: { page: page.toString() },
|
|
59
|
-
hash: props.hash != "" ? props.hash : undefined,
|
|
60
|
-
});
|
|
61
|
-
};
|
|
62
|
-
const page = (page: number) => {
|
|
63
|
-
if (!isNewPage(page)) return;
|
|
64
|
-
|
|
65
|
-
history.push({
|
|
66
|
-
path: history.currentRoute.path,
|
|
67
|
-
query: { page: page.toString() },
|
|
58
|
+
query: { page: page.toString(), ...route.query },
|
|
68
59
|
hash: props.hash != "" ? props.hash : undefined,
|
|
69
60
|
});
|
|
70
61
|
};
|
|
@@ -129,6 +120,15 @@ useFyHead({
|
|
|
129
120
|
rel: "prev",
|
|
130
121
|
key: "prev",
|
|
131
122
|
});
|
|
123
|
+
// add canonical
|
|
124
|
+
const url = getURL();
|
|
125
|
+
if (url) {
|
|
126
|
+
result.push({
|
|
127
|
+
href: `${url.Scheme}://${url.Host}${url.Path}`,
|
|
128
|
+
rel: "canonical",
|
|
129
|
+
key: "canonical",
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
132
|
return result;
|
|
133
133
|
}),
|
|
134
134
|
});
|
|
@@ -154,7 +154,9 @@ useFyHead({
|
|
|
154
154
|
<li v-if="items.page_no - 2 > 1">
|
|
155
155
|
<router-link
|
|
156
156
|
class="flex items-center justify-center px-3 h-8 leading-tight text-fv-neutral-500 bg-white border border-fv-neutral-300 hover:bg-fv-neutral-100 hover:text-fv-neutral-700 dark:bg-fv-neutral-800 dark:border-fv-neutral-700 dark:text-fv-neutral-400 dark:hover:bg-fv-neutral-700 dark:hover:text-white"
|
|
157
|
-
:to="
|
|
157
|
+
:to="
|
|
158
|
+
currentUrl + '1' + (props.hash != '' ? `#${props.hash}` : '')
|
|
159
|
+
"
|
|
158
160
|
>
|
|
159
161
|
1
|
|
160
162
|
</router-link>
|
|
@@ -174,7 +176,11 @@ useFyHead({
|
|
|
174
176
|
>
|
|
175
177
|
<router-link
|
|
176
178
|
class="flex items-center justify-center px-3 h-8 leading-tight text-fv-neutral-500 bg-white border border-fv-neutral-300 hover:bg-fv-neutral-100 hover:text-fv-neutral-700 dark:bg-fv-neutral-800 dark:border-fv-neutral-700 dark:text-fv-neutral-400 dark:hover:bg-fv-neutral-700 dark:hover:text-white"
|
|
177
|
-
:to="
|
|
179
|
+
:to="
|
|
180
|
+
currentUrl +
|
|
181
|
+
(items.page_no - (3 - i)) +
|
|
182
|
+
(props.hash != '' ? `#${props.hash}` : '')
|
|
183
|
+
"
|
|
178
184
|
>
|
|
179
185
|
{{ items.page_no - (3 - i) }}
|
|
180
186
|
</router-link>
|
|
@@ -195,7 +201,11 @@ useFyHead({
|
|
|
195
201
|
>
|
|
196
202
|
<router-link
|
|
197
203
|
class="flex items-center justify-center px-3 h-8 leading-tight text-fv-neutral-500 bg-white border border-fv-neutral-300 hover:bg-fv-neutral-100 hover:text-fv-neutral-700 dark:bg-fv-neutral-800 dark:border-fv-neutral-700 dark:text-fv-neutral-400 dark:hover:bg-fv-neutral-700 dark:hover:text-white"
|
|
198
|
-
:to="
|
|
204
|
+
:to="
|
|
205
|
+
currentUrl +
|
|
206
|
+
(items.page_no + i) +
|
|
207
|
+
(props.hash != '' ? `#${props.hash}` : '')
|
|
208
|
+
"
|
|
199
209
|
>
|
|
200
210
|
{{ items.page_no + i }}
|
|
201
211
|
</router-link>
|
|
@@ -211,7 +221,11 @@ useFyHead({
|
|
|
211
221
|
<li v-if="items.page_no + 2 < items.page_max">
|
|
212
222
|
<router-link
|
|
213
223
|
class="flex items-center justify-center px-3 h-8 leading-tight text-fv-neutral-500 bg-white border border-fv-neutral-300 hover:bg-fv-neutral-100 hover:text-fv-neutral-700 dark:bg-fv-neutral-800 dark:border-fv-neutral-700 dark:text-fv-neutral-400 dark:hover:bg-fv-neutral-700 dark:hover:text-white"
|
|
214
|
-
:to="
|
|
224
|
+
:to="
|
|
225
|
+
currentUrl +
|
|
226
|
+
items.page_max +
|
|
227
|
+
(props.hash != '' ? `#${props.hash}` : '')
|
|
228
|
+
"
|
|
215
229
|
>
|
|
216
230
|
{{ items.page_max }}
|
|
217
231
|
</router-link>
|