Skip to content

Commit 79f308a

Browse files
committed
fix scrollbars in main section
1 parent 0f34429 commit 79f308a

File tree

3 files changed

+25
-12
lines changed

3 files changed

+25
-12
lines changed

components.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ declare module 'vue' {
1717
ElCol: typeof import('element-plus/es')['ElCol']
1818
ElCollapse: typeof import('element-plus/es')['ElCollapse']
1919
ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem']
20+
ElConainer: typeof import('element-plus/es')['ElConainer']
2021
ElContainer: typeof import('element-plus/es')['ElContainer']
2122
ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
2223
ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']

src/App.vue

+9-2
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,17 @@ const isChatbotEnabled = import.meta.env.VITE_CHATBOT_ENABLED === 'true'
3939
<!--Header-->
4040
<HeaderNav />
4141
</el-header>
42-
<RouterView />
42+
<el-main>
43+
44+
<RouterView />
45+
</el-main>
4346
<ChatWidget v-if="isChatbotEnabled"/>
4447
</el-container>
4548
</div>
4649
</template>
4750

48-
<style scoped></style>
51+
<style scoped>
52+
.common-layout {
53+
overflow: hidden;
54+
}
55+
</style>

src/views/BodyView.vue

+15-10
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ import { inject } from 'vue'
4949
</el-header>
5050
<el-container class="middle">
5151
<el-aside class="summary" width="50%">
52-
<!--Middle -->
5352
<RouterView name="body" />
5453
</el-aside>
55-
<el-aside class="preview" width="50%">
54+
<el-main class="preview">
5655
<!--right -->
5756
<RouterView class="preview" name="preview" />
58-
</el-aside>
57+
</el-main>
5958
</el-container>
59+
6060
<!--<el-footer> -->
6161
<!--Bottom -->
6262
<!--Footer
@@ -68,19 +68,24 @@ import { inject } from 'vue'
6868

6969
<style>
7070
.root {
71-
min-height: 100vh;
72-
overflow: unset;
73-
}
74-
.middle {
75-
max-height: 95vh;
71+
height: 100%;
72+
/* min-height: 100vh; */
7673
}
7774
.summary {
78-
max-height: 95vh;
75+
max-height: 100%;
76+
}
77+
.main {
78+
height: 100%;
79+
overflow: hidden;
80+
}
81+
.middle {
82+
height: 100%;
83+
overflow: hidden;
7984
}
8085
.preview {
8186
color: white;
8287
background-color: #151d30;
83-
max-height: 100vh;
88+
max-height: 100%;
8489
}
8590
.collections {
8691
margin-left: -20px;

0 commit comments

Comments
 (0)