Skip to content

Commit c171069

Browse files
committed
fix: Scroll issue in vue3 transition return animation (#74)
1 parent 61e6e4a commit c171069

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/App.vue

+2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@ onMounted(() => {
5454
<style scoped>
5555
.app-wrapper {
5656
width: 100%;
57+
height: calc(100vh - 46px);
5758
position: absolute;
5859
top: 46px;
5960
left: 0;
61+
overflow-y: auto;
6062
}
6163
</style>

src/layouts/default.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<main p="16" text="gray-700 dark:gray-200">
33
<RouterView />
44

5-
<div mx-auto py-15 text-center text-10 text-gray-500>
5+
<div mx-auto mb-60 pt-15 text-center text-10 text-gray-500>
66
[Default Layout]
77
</div>
88
</main>

src/styles/app.less

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,14 @@ html.dark {
1414
color-scheme: dark;
1515
}
1616

17-
html, body {
18-
height: 100%;
17+
body {
1918
overflow: hidden;
2019
}
2120

2221
#app {
2322
height: 100vh;
2423
position: relative;
2524
overflow-x: hidden;
26-
overflow-y: auto;
2725
}
2826

2927
::-webkit-scrollbar {

0 commit comments

Comments
 (0)