diff --git a/src/assets/styles/sidebar.scss b/src/assets/styles/sidebar.scss index e32c8a4..edc6880 100644 --- a/src/assets/styles/sidebar.scss +++ b/src/assets/styles/sidebar.scss @@ -248,6 +248,30 @@ } } + .platform-admin-main { + height: calc(100vh - 50px); + overflow: auto !important; + background: + radial-gradient(circle at 12% 18%, rgba(14, 74, 112, 0.45), transparent 34%), + radial-gradient(circle at 78% 6%, rgba(25, 92, 170, 0.3), transparent 28%), + linear-gradient(135deg, #03070e 0%, #061827 48%, #02060d 100%) !important; + + &::-webkit-scrollbar { + width: 5px; + height: 5px; + } + + &::-webkit-scrollbar-track { + background: #111a24; + border-radius: 10px; + } + + &::-webkit-scrollbar-thumb { + background: #2d8fcf; + border-radius: 10px; + } + } + .studentLayout, .teacherLayout { background: @@ -767,10 +791,11 @@ } /* - * 教师端亮色主题覆盖 - * 取代 #app .studentLayout, #app .teacherLayout 共享的暗色背景 - * 仅作用于 .teacherLayout,保留学生端原有暗黑风格 + * 学生端 + 教师端共用亮色主题覆盖 + * 取代 #app .studentLayout, #app .teacherLayout 共享的暗色背景(L274-411) + * 超管端 (role 1) 走独立深色路径:#app .platform-admin-main (L250-272) */ +#app .studentLayout, #app .teacherLayout { // 整体浅色背景 + 蓝色点缀,营造明亮的科技感 background: @@ -888,18 +913,35 @@ box-shadow: 0 4px 14px rgba(30, 136, 229, 0.3) !important; } } + + // 折叠按钮:亮色玻璃 + 蓝色描边(覆盖 L274-411 暗黑版本) + .course-sidebar-toggle { + border: 1px solid rgba(30, 136, 229, 0.32) !important; + border-radius: 9px !important; + color: #1e88e5 !important; + background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%) !important; + box-shadow: 0 2px 10px rgba(30, 60, 100, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important; + + &:hover { + border-color: rgba(30, 136, 229, 0.55) !important; + color: #ffffff !important; + background: linear-gradient(135deg, #1e88e5, #42a5f5) !important; + box-shadow: 0 4px 14px rgba(30, 136, 229, 0.3) !important; + } + } } } /* - * 教师端实训页背景覆盖 - * student-training.scss 中 #app .teacherLayout .app-main:has(.student-training-shell) 使用了暗色背景 - * 此处覆盖为亮色,确保实训页与教师端整体亮色主题一致 + * 学生端 + 教师端实训页背景覆盖 + * student-training.scss 中 .student-training-shell 的暗色背景统一覆盖为亮色 */ +#app .studentLayout .app-main:has(.student-training-shell), #app .teacherLayout .app-main:has(.student-training-shell) { background: linear-gradient(135deg, #f5f8fc 0%, #eaf2fb 52%, #f3f8ff 100%) !important; } +#app .studentLayout .app-main:has(.student-training-shell) .student-training-shell, #app .teacherLayout .app-main:has(.student-training-shell) .student-training-shell { background: transparent !important; } diff --git a/src/assets/styles/teacher-light.scss b/src/assets/styles/teacher-light.scss index 42c0cf0..3db693f 100644 --- a/src/assets/styles/teacher-light.scss +++ b/src/assets/styles/teacher-light.scss @@ -65,12 +65,10 @@ color: #5a7896 !important; } - // 图标块:暗青渐变 -> 科技蓝渐变 + // 纯青色图标块:保留蓝色渐变,降低发光 .header-icon { - background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%) !important; color: #ffffff !important; box-shadow: 0 6px 18px rgba(30, 136, 229, 0.28) !important; - border: none !important; } // 玻璃质感图标框 @@ -115,29 +113,21 @@ } /* ---------- 3. 搜索栏 / 工具条 ---------- */ - // AppMain.vue .teacher-main 根下的暗黑搜索栏必须覆盖 - .df, .query-bar, .task-toolbar, .toolbar, - .filter-section { + .filter-section, + .df { background: #ffffff !important; border: 1px solid rgba(30, 136, 229, 0.15) !important; box-shadow: 0 4px 14px rgba(30, 60, 100, 0.06) !important; - color: #2c4a6a !important; - } - - .df .el-form-item__label, - .query-bar .el-form-item__label, - .df span, - .online span { - color: #2c4a6a !important; - font-weight: 500; } .query-item .query-label, .class-picker, - .toolbar .query-label { + .toolbar .query-label, + .df span, + .online span { color: #2c4a6a !important; } @@ -222,6 +212,16 @@ border-bottom: 1px solid #edf2f7 !important; } + // 紧凑化:正文行单元格 padding 从 Element 默认 ~12px 减到 6px 左右,行高 ~40px + td.el-table__cell { + padding-top: 6px !important; + padding-bottom: 6px !important; + + .cell { + line-height: 1.5 !important; + } + } + // 斑马纹(若开启) .el-table__row--striped td.el-table__cell { background-color: #f8fbff !important; @@ -260,28 +260,19 @@ box-shadow: none; transform: none; - // 默认按钮(无 type):统一蓝实心 + 白字,和 primary 完全一致 - &:not(.el-button--primary):not(.el-button--success):not(.el-button--warning):not(.el-button--danger):not(.el-button--info):not(.is-text):not(.is-link):not(.is-plain) { - background-color: #1e88e5 !important; - border-color: #1e88e5 !important; - color: #ffffff !important; - box-shadow: none !important; + // 默认按钮 + &:not(.el-button--primary):not(.el-button--success):not(.el-button--warning):not(.el-button--danger):not(.el-button--info):not(.is-text):not(.is-link) { + background-color: #ffffff !important; + border-color: #c9d8e8 !important; + color: #2c4a6a !important; &:hover, &:focus { - background-color: #42a5f5 !important; - border-color: #42a5f5 !important; - color: #ffffff !important; - box-shadow: 0 4px 12px rgba(30, 136, 229, 0.22) !important; - } - - &.is-disabled, - &.is-disabled:hover { - background-color: #e8f3fe !important; - border-color: #9cc8ef !important; - color: #64b5f6 !important; - opacity: 1; - cursor: not-allowed !important; + background-color: #f0f7ff !important; + border-color: #1e88e5 !important; + color: #1e88e5 !important; + box-shadow: none !important; + transform: none !important; } } @@ -422,25 +413,13 @@ } } - // 禁用:灰底深字,在白底表格上清晰可辨 + // 禁用 &.is-disabled, &.is-disabled:hover, &.is-disabled:focus { - background-color: #e8f3fe !important; - border-color: #9cc8ef !important; - color: #64b5f6 !important; - opacity: 1; + opacity: 0.55; transform: none !important; box-shadow: none !important; - cursor: not-allowed !important; - } - - // text/link 按钮的 disabled 覆盖(优先级高于彩色实心规则) - &.is-text.is-disabled, - &.is-link.is-disabled { - background-color: #e8f3fe !important; - border-color: #9cc8ef !important; - color: #8aa8c4 !important; } } @@ -497,8 +476,8 @@ .el-select .el-input.is-disabled .el-input__wrapper, .el-input.is-disabled .el-input__wrapper { - background-color: #f0f7ff !important; - box-shadow: 0 0 0 1px #9cc8ef inset !important; + background-color: #f4f7fa !important; + box-shadow: 0 0 0 1px #e0e8f0 inset !important; .el-input__inner { color: #8aa8c4 !important; @@ -551,7 +530,7 @@ .el-pager li { background-color: #ffffff !important; color: #2c4a6a !important; - border: 1px solid #c9d8e8; + border: 1px solid #d5e1ee; border-radius: 6px; font-weight: 500; @@ -575,14 +554,14 @@ &:disabled, &.is-disabled { - background-color: #f0f7ff !important; + background-color: #f4f7fa !important; color: #b0c0d0 !important; } } .el-select .el-input__wrapper { background-color: #ffffff !important; - box-shadow: 0 0 0 1px #c9d8e8 inset !important; + box-shadow: 0 0 0 1px #d5e1ee inset !important; .el-input__inner { color: #2c4a6a !important; @@ -630,15 +609,11 @@ } &.el-tag--info { - color: #2c4a6a !important; - background-color: #e8f3fe !important; - border-color: #9cc8ef !important; - &.is-plain, &.is-light { color: #5e6b7c !important; - background-color: #f0f7ff !important; - border-color: #c9d8e8 !important; + background-color: #f4f6f9 !important; + border-color: #d3dae3 !important; } } } @@ -657,13 +632,13 @@ } .el-tabs__nav-wrap::after { - background-color: rgba(30, 136, 229, 0.12); + background-color: #e3eaf2; } // 描述列表 .el-descriptions__label { color: #5a7896 !important; - background: #f0f7ff !important; + background: #f6f9fc !important; } .el-descriptions__content { @@ -713,12 +688,6 @@ /* ---------- 16. 按钮/表头/密度统一规范(仅样式层,不改模板) ---------- */ - // 浅灰 .title 容器背景 -> 浅蓝 - .title { - background: #f0f7ff !important; - border-color: rgba(30, 136, 229, 0.12) !important; - } - // 16.1 工具栏按钮语义纠偏 // 语义约定:查询/搜索/保存=蓝,新增=绿,导入=蓝,导出/下载=橙,重置/刷新/配置=白底 // 学生管理:btn-group 首个 primary 是“新增” -> 绿;末个 primary 是“刷新” -> 白底 @@ -797,16 +766,95 @@ } } - // 16.2 表格操作列:text/link/默认按钮统一为小号实心按钮 + // 16.2 表格操作列:text/link/默认按钮统一为小号实心按钮 + 不换行并排 .el-table { .action-group { gap: 6px !important; + flex-wrap: nowrap !important; + white-space: nowrap !important; } .cell .el-button + .el-button { margin-left: 6px !important; } + // 操作列单元格强制不换行,避免按钮堆叠成多行 + .cell, + td.el-table__cell .cell { + &.action, + [class*="action"] { + white-space: nowrap !important; + } + } + + // 兜底:按钮直接放在单元格内且多个相邻时不换行(其他教师端页面)。 + // 教师管理页按钮已包进 .action-btn-group,.cell 的直接子级不再有相邻按钮, + // 故本规则不命中该页 —— cell 可正常换行,让组外 el-tag 掉到第二行。 + tbody td.el-table__cell .cell:has(> .el-button + .el-button) { + white-space: nowrap !important; + overflow: visible !important; + } + + // 教师管理页:三个操作按钮成组保持一排,组外 el-tag 宽度不够时自行换到下一行 + // 该列无固定 width,el-table 按剩余空间分配会裁切按钮组,此处固定列宽 + &:has(.action-btn-group) { + colgroup col:last-child { + width: 230px !important; + min-width: 230px !important; + } + } + + .action-btn-group { + display: inline-flex !important; + flex-wrap: nowrap !important; + align-items: center !important; + gap: 6px !important; + white-space: nowrap !important; + vertical-align: middle !important; + + .el-button + .el-button { + margin-left: 0 !important; + } + } + + // 组外提示 tag:换到第二行后占满列宽、文字允许折行,避免再被裁切 + td.el-table__cell .cell:has(.action-btn-group) { + display: flex !important; + flex-wrap: wrap !important; + justify-content: center !important; + row-gap: 4px !important; + } + + td.el-table__cell .cell:has(.action-btn-group) > .el-tag { + margin-left: 0 !important; + max-width: 100% !important; + white-space: normal !important; + height: auto !important; + line-height: 1.4 !important; + } + + // 教师管理页:暗黑遗留的浅色文字在白底上模糊,统一为亮色主题清晰色 + // 名下班级 chip:浅蓝底 + 深蓝字(与 plain primary tag 同系) + .owned-class-chip { + color: #1565c0 !important; + border: 1px solid #9cc8ef !important; + background: #e8f3fe !important; + } + + // 暂无班级:中性灰蓝(与表格空数据文字一致) + .empty-summary { + color: #8aa8c4 !important; + } + + // 学生数量:深色科技蓝数字 + .student-count { + color: #1e88e5 !important; + + small { + color: #6b85a3 !important; + } + } + .el-button { height: 26px !important; min-height: 26px !important; @@ -822,28 +870,73 @@ margin-right: 2px; } - // 表格操作列的文字按钮(is-text / is-link):透明底 + 彩色字 - // 颜色由 Section 6 / Section 16 的 is-text 规则控制,这里只保证透明度 & 尺寸 + // 把文字按钮(is-text / is-link)重置为实心 &.is-text, &.is-link { - background: transparent !important; - background-image: none !important; - background-color: transparent !important; - border-color: transparent !important; - box-shadow: none !important; - font-weight: 500 !important; + &.el-button--primary { + background-color: #1e88e5 !important; + border-color: #1e88e5 !important; + color: #ffffff !important; - &:hover:not(.is-disabled) { - background: rgba(30, 136, 229, 0.08) !important; - box-shadow: none !important; + &:hover, + &:focus { + background-color: #42a5f5 !important; + border-color: #42a5f5 !important; + color: #ffffff !important; + } } - &.is-disabled { - background: #f0f7ff !important; - background-image: none !important; - background-color: #f0f7ff !important; - border-color: transparent !important; - cursor: not-allowed !important; + &.el-button--success { + background-color: #2ba471 !important; + border-color: #2ba471 !important; + color: #ffffff !important; + + &:hover, + &:focus { + background-color: #3cbb85 !important; + border-color: #3cbb85 !important; + color: #ffffff !important; + } + } + + &.el-button--warning { + background-color: #e8a33d !important; + border-color: #e8a33d !important; + color: #ffffff !important; + + &:hover, + &:focus { + background-color: #f2b45a !important; + border-color: #f2b45a !important; + color: #ffffff !important; + } + } + + &.el-button--danger { + background-color: #e05a5a !important; + border-color: #e05a5a !important; + color: #ffffff !important; + + &:hover, + &:focus { + background-color: #ec7272 !important; + border-color: #ec7272 !important; + color: #ffffff !important; + } + } + + // 无类型的文字按钮 -> 白底描边 + &:not(.el-button--primary):not(.el-button--success):not(.el-button--warning):not(.el-button--danger):not(.el-button--info) { + background-color: #ffffff !important; + border-color: #c9d8e8 !important; + color: #2c4a6a !important; + + &:hover, + &:focus { + background-color: #f0f7ff !important; + border-color: #1e88e5 !important; + color: #1e88e5 !important; + } } } @@ -855,23 +948,25 @@ font-weight: 500 !important; } - // 禁用:浅蓝底深蓝字,科技蓝主题一致 + // 禁用态保持可见但弱化 &.is-disabled, &.is-disabled:hover { - background-color: #e8f3fe !important; - border-color: #9cc8ef !important; - color: #64b5f6 !important; - opacity: 1; + opacity: 0.55 !important; cursor: not-allowed !important; } + } + } - // text/link 按钮的 disabled 覆盖(优先级高于彩色实心规则) - &.is-text.is-disabled, - &.is-link.is-disabled { - background-color: #e8f3fe !important; - border-color: #9cc8ef !important; - color: #64b5f6 !important; - } + // 成绩中心只读分数:暗黑遗留亮青字统一为深色科技蓝 + .teacher-score-readonly { + strong { + color: #1e88e5 !important; + } + + small { + color: #6b85a3 !important; + border-color: #c9d8e8 !important; + background: #f4f8fd !important; } } @@ -900,6 +995,64 @@ } } + // 16.5 工具栏按钮统一:32px 高度 + 色板复用全局定义 + // 覆盖容器:.df / .query-bar / .toolbar / .task-toolbar / .filter-section / .toolbar-actions + // 色板已在第 6 节 .el-button 统一:primary=#1e88e5 / success=#2ba471 / + // warning=#e8a33d / danger=#e05a5a / default=白底描边,此处只控尺寸和换行 + .df, + .query-bar, + .toolbar, + .task-toolbar, + .filter-section, + .toolbar-actions { + display: flex !important; + flex-wrap: wrap !important; + align-items: center !important; + gap: 8px !important; + + > .el-button, + .el-button { + height: 32px !important; + min-height: 32px !important; + padding: 0 14px !important; + font-size: 13px !important; + font-weight: 500 !important; + line-height: 32px !important; + border-radius: 8px !important; + + .el-icon { + font-size: 14px !important; + margin-right: 4px; + } + } + } + + // 16.6 工具栏按钮不换行兜底:工具栏内按钮组保持一行 + .query-bar .btn-group, + .toolbar .btn-group, + .df > div + div, + .toolbar-actions { + display: flex !important; + flex-wrap: nowrap !important; + align-items: center !important; + gap: 8px !important; + } + + // 成绩中心:操作按钮被带 title 提示的 包裹, + // 破坏 Element 的 .el-button + .el-button 相邻间距,三个按钮粘连。 + // 用 :has 精准命中含 span 包裹按钮的 inline 表单项,flex gap 补回间距。 + .el-form--inline .el-form-item__content:has(> span > .el-button) { + display: inline-flex !important; + flex-wrap: wrap !important; + align-items: center !important; + gap: 10px !important; + + > span { + display: inline-flex !important; + align-items: center !important; + } + } + // 16.4 整体布局紧凑化 .page-header { padding: 14px 20px !important; @@ -988,7 +1141,7 @@ body.teacher-light-mode { .el-select__popper.el-popper, .el-select-dropdown { background: #ffffff !important; - border: 1px solid #c9d8e8 !important; + border: 1px solid #d5e1ee !important; box-shadow: 0 8px 24px rgba(30, 60, 100, 0.12) !important; .el-select-dropdown__item { @@ -1017,7 +1170,7 @@ body.teacher-light-mode { .el-popper__arrow::before { background: #ffffff !important; - border-color: #c9d8e8 !important; + border-color: #d5e1ee !important; } } @@ -1031,7 +1184,7 @@ body.teacher-light-mode { .el-date-picker, .el-time-panel { background: #ffffff !important; - border: 1px solid #c9d8e8 !important; + border: 1px solid #d5e1ee !important; box-shadow: 0 8px 24px rgba(30, 60, 100, 0.12) !important; color: #2c4a6a !important; @@ -1080,12 +1233,12 @@ body.teacher-light-mode { } .el-picker-panel__footer { - background: #f0f7ff !important; - border-top-color: rgba(30, 136, 229, 0.12) !important; + background: #f6f9fc !important; + border-top-color: #e3eaf2 !important; } .el-picker-panel__sidebar { - border-right-color: rgba(30, 136, 229, 0.12) !important; + border-right-color: #e3eaf2 !important; } .el-time-panel__btn.confirm { @@ -1097,7 +1250,7 @@ body.teacher-light-mode { .teacher-dialog, .admin-edit-dialog { background: #ffffff !important; - border: 1px solid #c9d8e8 !important; + border: 1px solid #d5e1ee !important; border-radius: 16px !important; box-shadow: 0 20px 56px rgba(30, 60, 100, 0.18) !important; overflow: hidden; @@ -1131,7 +1284,7 @@ body.teacher-light-mode { } .el-dialog__footer { - background: #f8fbff !important; + background: #f8fbfe !important; border-top: 1px solid #edf2f7 !important; padding: 14px 24px; } @@ -1159,7 +1312,7 @@ body.teacher-light-mode { // 班级成员管理弹窗内的搜索工具条 .member-toolbar { - background: #f8fbff !important; + background: #f8fbfe !important; border: 1px solid rgba(30, 136, 229, 0.12) !important; } } @@ -1168,7 +1321,7 @@ body.teacher-light-mode { .el-overlay { .el-message-box { background: #ffffff !important; - border: 1px solid #c9d8e8 !important; + border: 1px solid #d5e1ee !important; box-shadow: 0 20px 56px rgba(30, 60, 100, 0.2) !important; border-radius: 14px; @@ -1187,7 +1340,7 @@ body.teacher-light-mode { // 轻提示 .el-message { background: #ffffff !important; - border: 1px solid #c9d8e8 !important; + border: 1px solid #d5e1ee !important; box-shadow: 0 8px 24px rgba(30, 60, 100, 0.12) !important; color: #2c4a6a !important; @@ -1199,7 +1352,7 @@ body.teacher-light-mode { // 通知 .el-notification { background: #ffffff !important; - border: 1px solid #c9d8e8 !important; + border: 1px solid #d5e1ee !important; box-shadow: 0 8px 24px rgba(30, 60, 100, 0.12) !important; .el-notification__title { @@ -1444,7 +1597,7 @@ body.teacher-light-mode { /* ---------- 14. 实训任务管理页 ---------- */ .teacher-main.training-task-main-theme { - background: linear-gradient(135deg, #f0f7ff 0%, #eaf2fb 48%, #f3f8ff 100%) !important; + background: linear-gradient(135deg, #f5f8fc 0%, #eaf2fb 48%, #f3f8ff 100%) !important; } .training-task-page { @@ -1722,17 +1875,17 @@ body.teacher-light-mode { * ============================================================= */ body.teacher-light-mode { .training-task-drawer.el-drawer { - background: #f0f7ff !important; + background: #f5f8fc !important; box-shadow: -10px 0 36px rgba(30, 60, 100, 0.14) !important; .el-drawer__body { - background: #f0f7ff; + background: #f5f8fc; } } .training-task-drawer { .drawer-shell { - background: #f0f7ff !important; + background: #f5f8fc !important; color: #2c4a6a; } @@ -1741,6 +1894,50 @@ body.teacher-light-mode { border-bottom: 1px solid rgba(30, 136, 229, 0.12) !important; } + // 标题区文字:h3 白字 / p 浅蓝字在浅底上不可见,统一深色 + .drawer-heading { + h3 { + color: #1e3a5f !important; + } + + p { + color: #6b85a3 !important; + } + } + + // 信息条:scoped 为 rgba(0,10,20,0.3) 深底,亮色场景发灰,改为浅蓝底 + .drawer-identity { + background: #eef5fc !important; + border-bottom: 1px solid rgba(30, 136, 229, 0.12) !important; + } + + // 信息条内项目值:确保深色 + .identity-content { + strong { + color: #1e3a5f !important; + } + } + + // 底部操作条:scoped 为 rgba(0,10,20,0.95) 近黑,改为白底浅分隔线 + .drawer-footer { + background: #ffffff !important; + border-top: 1px solid rgba(30, 136, 229, 0.12) !important; + box-shadow: 0 -4px 16px rgba(30, 60, 100, 0.06) !important; + } + + // 取消/关闭按钮:scoped 暗色玻璃态,改为白底描边深色字 + .cancel-btn { + color: #2c4a6a !important; + background: #ffffff !important; + border: 1px solid #c9d8e8 !important; + + &:hover { + color: #1e88e5 !important; + background: #f0f7ff !important; + border-color: #1e88e5 !important; + } + } + .drawer-kicker { color: #1565c0 !important; background: rgba(30, 136, 229, 0.1) !important; @@ -1765,7 +1962,11 @@ body.teacher-light-mode { } .status-value { - color: #1e3a5f !important; + color: #e05a5a !important; + + &.enabled { + color: #2ba471 !important; + } } } @@ -1783,19 +1984,28 @@ body.teacher-light-mode { } } + // h4/p 在 scoped 中有显式浅色(#fff / rgba(200,230,255,.5)),继承压不住,需显式覆盖 .section-info { - color: #5a7896 !important; + h4 { + color: #1e3a5f !important; + } + + p { + color: #8aa8c4 !important; + } } .objective-row, .step-item, .material-row { - background: #f8fbff !important; + background: #f8fbfe !important; border-color: rgba(30, 136, 229, 0.12) !important; color: #2c4a6a !important; - .objective-number { + .objective-number, + .step-number { background: rgba(30, 136, 229, 0.1) !important; + border-color: rgba(30, 136, 229, 0.25) !important; color: #1e88e5 !important; } } @@ -1809,6 +2019,7 @@ body.teacher-light-mode { } .add-step-button, + .add-objective-button, .upload-btn { background: rgba(30, 136, 229, 0.08) !important; border-color: rgba(30, 136, 229, 0.3) !important; @@ -1871,309 +2082,3 @@ body.teacher-light-mode { } } } - -/* ============================================================= - * 16. AppMain.vue .teacher-main 根暗黑样式全覆盖 - * (AppMain.vue 用 .teacher-main 全局无 scope 选择器把所有教师端染成暗黑) - * ============================================================= */ -#app .teacherLayout .teacher-main { - color: #1e3a5f !important; - - .app-container { - background: #f8fbff !important; - border: 1px solid rgba(30, 136, 229, 0.12) !important; - box-shadow: 0 12px 36px rgba(30, 60, 100, 0.08) !important; - backdrop-filter: none !important; - } - - // 输入框/选择器暗黑底 - .el-input__wrapper, - .el-select__wrapper, - .el-textarea__inner { - background: #ffffff !important; - border: 1px solid #dce5ee !important; - box-shadow: none !important; - } - - .el-input__inner, - .el-select__selected-item { - color: #1e3a5f !important; - } - - .el-input__inner::placeholder { - color: #8aa8c4 !important; - } - - // 按钮(AppMain.vue .teacher-main 暗黑按钮覆盖,优先级高于 Section 6) - // 实心按钮(非 text/link/plain) - .el-button:not(.is-text):not(.is-link):not(.is-plain) { - // primary 实心 - &.el-button--primary { - border-color: #1e88e5 !important; - background: #1e88e5 !important; - color: #ffffff !important; - box-shadow: none !important; - - &:hover, &:focus { - background: #42a5f5 !important; - border-color: #42a5f5 !important; - color: #ffffff !important; - } - - &.is-disabled { - background: #e8f3fe !important; - border-color: #9cc8ef !important; - color: #64b5f6 !important; - } - } - - // success 实心 - &.el-button--success { - border-color: #2ba471 !important; - background: #2ba471 !important; - color: #ffffff !important; - &:hover { background: #3cbb85 !important; border-color: #3cbb85 !important; } - &.is-disabled { background: #e5f7ee !important; border-color: #b0dfc5 !important; color: #6bbf95 !important; } - } - - // warning 实心 - &.el-button--warning { - border-color: #e8a33d !important; - background: #e8a33d !important; - color: #ffffff !important; - &:hover { background: #f2b45a !important; border-color: #f2b45a !important; } - &.is-disabled { background: #fdf3e2 !important; border-color: #f3d3a0 !important; color: #d4a059 !important; } - } - - // danger 实心 - &.el-button--danger { - border-color: #e05a5a !important; - background: #e05a5a !important; - color: #ffffff !important; - &:hover { background: #ec7272 !important; border-color: #ec7272 !important; } - &.is-disabled { background: #fdecec !important; border-color: #f3b0b0 !important; color: #d98a8a !important; } - } - - // default(无 type):蓝实心 + 白字,和 primary 完全一致 - &:not(.el-button--primary):not(.el-button--success):not(.el-button--warning):not(.el-button--danger):not(.el-button--info) { - background: #1e88e5 !important; - border-color: #1e88e5 !important; - color: #ffffff !important; - &:hover { background: #42a5f5 !important; border-color: #42a5f5 !important; color: #ffffff !important; } - &.is-disabled { background: #e8f3fe !important; border-color: #9cc8ef !important; color: #64b5f6 !important; cursor: not-allowed !important; } - } - } - - // text/link 文字按钮:透明底 + 彩色字(操作列用) - .el-button.is-text, - .el-button.is-link { - background: transparent !important; - background-image: none !important; - background-color: transparent !important; - border-color: transparent !important; - box-shadow: none !important; - - &.el-button--primary { color: #1976d2 !important; } - &.el-button--success { color: #1a7d4f !important; } - &.el-button--warning { color: #b36a14 !important; } - &.el-button--danger { color: #d04545 !important; } - &.el-button--info { color: #5e6b7c !important; } - - &:hover:not(.is-disabled) { - background: rgba(30, 136, 229, 0.08) !important; - box-shadow: none !important; - } - - &.is-disabled { - background: #f0f7ff !important; - background-image: none !important; - background-color: #f0f7ff !important; - border-color: transparent !important; - color: #9cc8ef !important; - cursor: not-allowed !important; - } - } - - // plain 朴素按钮:浅色底 + 深字 - .el-button.is-plain { - &.el-button--primary { background: #e8f3fe !important; border-color: #9cc8ef !important; color: #1565c0 !important; &:hover { background: #1e88e5 !important; color: #fff !important; border-color: #1e88e5 !important; } } - &.el-button--success { background: #e5f7ee !important; border-color: #b0dfc5 !important; color: #1a7d4f !important; &:hover { background: #2ba471 !important; color: #fff !important; border-color: #2ba471 !important; } } - &.el-button--warning { background: #fdf3e2 !important; border-color: #f3d3a0 !important; color: #b36a14 !important; &:hover { background: #e8a33d !important; color: #fff !important; border-color: #e8a33d !important; } } - &.el-button--danger { background: #fdecec !important; border-color: #f3b0b0 !important; color: #c0392b !important; &:hover { background: #e05a5a !important; color: #fff !important; border-color: #e05a5a !important; } } - &.is-disabled { opacity: 0.55; } - } - - // 表格 CSS 变量(暗黑 table 的根源) - .el-table { - --el-table-border-color: rgba(30, 136, 229, 0.12) !important; - --el-table-header-bg-color: #e3effb !important; - --el-table-tr-bg-color: #ffffff !important; - --el-fill-color-lighter: #f8fbff !important; - --el-table-row-hover-bg-color: rgba(30, 136, 229, 0.06) !important; - color: #2c4a6a !important; - background: #ffffff !important; - } - - .el-table th.el-table__cell { - color: #1e3a5f !important; - background: linear-gradient(180deg, #eef6fe, #dcebfb) !important; - font-weight: 600 !important; - text-shadow: none !important; - } - - .el-table tr, - .el-table td.el-table__cell { - background: #ffffff !important; - } - - .el-table__empty-text { - color: #6b85a3 !important; - } - - // 暗黑卡片 - .el-card { - color: #2c4a6a !important; - border: 1px solid rgba(30, 136, 229, 0.12) !important; - background: #ffffff !important; - } - - .el-card__header { - border-bottom-color: rgba(30, 136, 229, 0.1) !important; - color: #1e3a5f !important; - } - - // 分页暗黑 - .el-pagination { - color: #2c4a6a !important; - } - - // Tabs 暗黑 - .el-tabs__item { - color: #6b85a3 !important; - } - - .el-tabs__item.is-active { - color: #1e88e5 !important; - } - - .el-tabs__active-bar { - background-color: #1e88e5 !important; - } -} - -/* ============================================================= - * 17. .teacher-dialog 全局暗黑 dialog 覆盖 - * (AppMain.vue 无 scope 的 .teacher-dialog 样式在全局生效) - * ============================================================= */ -body.teacher-light-mode { - .teacher-dialog { - --el-dialog-bg-color: #ffffff; - --el-text-color-primary: #1e3a5f; - --el-text-color-regular: #2c4a6a; - border: 1px solid rgba(30, 136, 229, 0.2) !important; - border-radius: 12px !important; - background: #ffffff !important; - box-shadow: 0 16px 48px rgba(30, 60, 100, 0.18) !important; - } - - .teacher-dialog .el-dialog__header { - border-bottom: 1px solid rgba(30, 136, 229, 0.1) !important; - background: transparent !important; - } - - .teacher-dialog .el-dialog__title { - color: #1e3a5f !important; - font-weight: 700 !important; - } - - .teacher-dialog .el-dialog__headerbtn .el-dialog__close { - color: #6b85a3 !important; - } - - .teacher-dialog .el-dialog__headerbtn:hover .el-dialog__close { - color: #1e88e5 !important; - } - - .teacher-dialog .el-dialog__body { - color: #2c4a6a !important; - background: transparent !important; - } - - .teacher-dialog .el-dialog__footer { - background: transparent !important; - } - - .teacher-dialog .el-form-item__label { - color: #2c4a6a !important; - font-weight: 500 !important; - } - - .teacher-dialog .el-input__wrapper, - .teacher-dialog .el-select__wrapper, - .teacher-dialog .el-textarea__inner { - background: #ffffff !important; - border: 1px solid #dce5ee !important; - box-shadow: none !important; - } - - .teacher-dialog .el-input__inner, - .teacher-dialog .el-select__selected-item, - .teacher-dialog .el-textarea__inner { - color: #1e3a5f !important; - } - - .teacher-dialog .el-input__inner::placeholder { - color: #8aa8c4 !important; - } - - .teacher-dialog .el-input.is-disabled .el-input__wrapper, - .teacher-dialog .el-select.is-disabled .el-select__wrapper { - background: #f0f7ff !important; - border-color: #c9d8e8 !important; - } - - .teacher-dialog .el-input.is-disabled .el-input__inner, - .teacher-dialog .el-select.is-disabled .el-select__selected-item { - color: #6b85a3 !important; - } - - .teacher-dialog .el-button:not(.el-button--primary) { - color: #2c4a6a !important; - background: #ffffff !important; - border-color: #dce5ee !important; - } - - .teacher-dialog .el-button:not(.el-button--primary):hover { - color: #1e88e5 !important; - background: #f0f7ff !important; - border-color: #9cc8ef !important; - } - - // sidebar 暗黑 toggle 按钮 - .course-sidebar-toggle, - .sidebar-toggle-btn { - background: #ffffff !important; - border: 1px solid rgba(30, 136, 229, 0.25) !important; - color: #1e88e5 !important; - box-shadow: 0 4px 12px rgba(30, 136, 229, 0.18) !important; - } - - // Element Plus 默认灰 scrollbar - .el-scrollbar__thumb { - background-color: #c9d8e8 !important; - opacity: 0.8; - - &:hover { - background-color: #9cc8ef !important; - } - } - - .el-scrollbar__bar { - &.is-horizontal, - &.is-vertical { - & > .el-scrollbar__thumb { - background-color: #c9d8e8 !important; - } - } - } -} diff --git a/src/layout/components/AppMain.vue b/src/layout/components/AppMain.vue index 1113a2a..86a6fb8 100644 --- a/src/layout/components/AppMain.vue +++ b/src/layout/components/AppMain.vue @@ -1,11 +1,11 @@ - + - - - + diff --git a/src/views/teacherEnd/student/index.vue b/src/views/teacherEnd/student/index.vue index ac41b6b..369e621 100644 --- a/src/views/teacherEnd/student/index.vue +++ b/src/views/teacherEnd/student/index.vue @@ -97,25 +97,25 @@