mirror of
https://github.com/spark-store-project/spark-store-abyss
synced 2026-04-27 23:20:19 +08:00
fix: 在组件挂载时自动滚动到顶部以改善用户体验
Co-authored-by: Sylvanysc <Sylvanysc@users.noreply.github.com>
This commit is contained in:
9
app.vue
9
app.vue
@@ -48,6 +48,15 @@ onMounted(() => {
|
|||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
mounted.value = true;
|
mounted.value = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
watchEffect(() => {
|
||||||
|
if (path.value) {
|
||||||
|
scrollPanel.value?.$el.firstChild.firstChild.scrollTo({
|
||||||
|
top: 0,
|
||||||
|
behavior: "instant",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
const qrWidth = ref(0);
|
const qrWidth = ref(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user