全局自适应以及表格横向拖动优化

This commit is contained in:
2026-08-23 15:36:11 +08:00
parent 14d4fa7c7c
commit 61ef0c1214
5 changed files with 113 additions and 4 deletions
+32 -1
View File
@@ -1,4 +1,4 @@
@import './variables.scss';
@import './variables.scss';
@import './mixin.scss';
@import './transition.scss';
@import './element-ui.scss';
@@ -41,6 +41,37 @@ html {
height: 100%;
}
/* ================= 全局自适应加固 =================
与 src/utils/adaptive.js 的视口等比缩放配合,
兜底避免极端情况下出现页面级横向溢出与内容崩塌。 */
html,
body {
width: 100%;
}
body {
/* 禁止页面级横向滚动,防止因个别固定宽度元素把整页撑破;
表格自身的横向滚动由 el-table 内部滚动容器承担,不受影响 */
overflow-x: hidden;
}
/* 弹性布局子项允许收缩,避免 flex 容器被子项固有宽度撑破 */
#app,
.app-wrapper,
.main-container,
.lower-container {
min-width: 0;
}
/* 通用长文本换行,避免 url/数字/英文长串将布局撑破 */
a,
.el-button,
.el-table .cell,
.el-form-item__content,
.el-form-item__label {
word-break: break-word;
}
*,
*:before,
*:after {