diff --git a/src/styles/global.scss b/src/styles/global.scss index d2904fc..074cc04 100644 --- a/src/styles/global.scss +++ b/src/styles/global.scss @@ -375,6 +375,7 @@ html.dark { box-shadow: var(--gerp-shadow-hover); } } + /* ---------- 18. 禁止文本选中(导航/侧边栏/交互控件/标题类 UI) ---------- * 布局框架(顶部 nav + 侧边栏)与交互型控件不允许选中文字, * 避免拖选时选中整片导航文字;正文内容(表格数据/详情文本/输入框)保持可选中。 @@ -420,3 +421,16 @@ html.dark { -moz-user-select: none; -ms-user-select: none; } + +/* ---------- 19. 空状态(el-empty):统一居中 ---------- + * el-empty 自身虽是「flex 列 + align-items:center」,但宽度默认随内容收缩; + * 一旦作为 grid / flex 子项(如应用中心 .app-grid 卡片栅格)就会停在首列而偏左。 + * 这里统一撑满可用宽度,并在 grid 容器中跨满整行,保证任何容器下都水平居中。 + */ +.el-empty { + grid-column: 1 / -1; + width: 100%; + margin: 0 auto; + box-sizing: border-box; + text-align: center; +}