itube-specs 0.0.418 → 0.0.420
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.
|
@@ -171,10 +171,12 @@ watchEffect(() => {
|
|
|
171
171
|
function linkTo(value: string | number) {
|
|
172
172
|
const safeValue = Math.max(1, Number(value));
|
|
173
173
|
|
|
174
|
-
// Если это первая страница — ведём в
|
|
174
|
+
// Если это первая страница — ведём в корень, но сохраняем остальные query (удаляем только page)
|
|
175
175
|
if (safeValue === 1) {
|
|
176
|
+
const { [props.prefix]: _removed, ...restQuery } = route.query;
|
|
176
177
|
return {
|
|
177
|
-
path: route.path
|
|
178
|
+
path: route.path,
|
|
179
|
+
query: restQuery
|
|
178
180
|
}
|
|
179
181
|
}
|
|
180
182
|
|
|
@@ -186,10 +188,8 @@ function linkTo(value: string | number) {
|
|
|
186
188
|
}
|
|
187
189
|
}
|
|
188
190
|
|
|
189
|
-
watch(() => route.query['page'], (
|
|
190
|
-
|
|
191
|
-
document.documentElement.querySelector('#anchor')?.scrollIntoView({ behavior: 'smooth' });
|
|
192
|
-
}
|
|
191
|
+
watch(() => route.query['page'], () => {
|
|
192
|
+
document.documentElement.querySelector('#anchor')?.scrollIntoView({ behavior: 'smooth' });
|
|
193
193
|
})
|
|
194
194
|
|
|
195
195
|
const i18n = useI18n();
|