diff --git a/src/assets/styles/sidebar.scss b/src/assets/styles/sidebar.scss index 059261d..67c41e8 100644 --- a/src/assets/styles/sidebar.scss +++ b/src/assets/styles/sidebar.scss @@ -249,6 +249,13 @@ } } + /* 纯顶部导航模式(超管/校管,不渲染侧边栏):清除侧边菜单默认宽度的占位 */ + /* 需压过 #app .teacherLayout .main-container 的 margin-left:180px !important(位置更靠后),用双类提权 */ + .topNavbarOnly.teacherLayout .main-container, + .topNavbarOnly .main-container { + margin-left: 0 !important; + } + /* 超管端主区域:与教师端一致改浅色(body.teacher-light-mode 时),保留暗色作为无亮色主题时的兜底 */ .platform-admin-main { height: calc(100vh - 50px); @@ -273,17 +280,19 @@ /* @at-root 跳出 #app 并提升特异性(压过 #app .platform-admin-main 的 ID 权重深色规则) */ @at-root body.teacher-light-mode #app .platform-admin-main { - background: - radial-gradient(circle at 12% 18%, rgba(30, 136, 229, 0.05), transparent 34%), - radial-gradient(circle at 78% 6%, rgba(66, 165, 245, 0.04), transparent 28%), - linear-gradient(135deg, #f7fafd 0%, #eef4fb 48%, #f5f8fc 100%) !important; + // 纯白画布,与教师端/学生端亮色体系一致(禁渐变、禁浅灰底) + background: #ffffff !important; &::-webkit-scrollbar-track { - background: rgba(30, 60, 100, 0.06); + background: transparent; } &::-webkit-scrollbar-thumb { - background: rgba(59, 130, 246, 0.35); + background: #d1d5db; + + &:hover { + background: #9ca3af; + } } } diff --git a/src/assets/styles/teacher-light.scss b/src/assets/styles/teacher-light.scss index 42c9742..710e10e 100644 --- a/src/assets/styles/teacher-light.scss +++ b/src/assets/styles/teacher-light.scss @@ -1569,9 +1569,10 @@ body.teacher-light-mode { } } - // ===== 弹窗(teacher-dialog / admin-edit-dialog:扁平纯白 + 教育风令牌)===== + // ===== 弹窗(teacher-dialog / admin-edit-dialog / platform-admin-dialog:扁平纯白 + 教育风令牌)===== .teacher-dialog, - .admin-edit-dialog { + .admin-edit-dialog, + .platform-admin-dialog { // dialog 作用域内重设 EP CSS 变量,防止 html.dark 的 --el-color-primary:#00aaff 污染 --el-color-primary: #3b82f6; --el-color-primary-light-3: #60a5fa; @@ -1582,6 +1583,20 @@ body.teacher-light-mode { --el-color-primary-dark-2: #2563eb; --el-color-white: #ffffff; + // 令牌重设:teleport 到 body 的弹层继承不到 #app .teacherLayout 上的变量,必须在本作用域重发 + --edu-primary: #3b82f6; + --edu-primary-deep: #2563eb; + --edu-primary-soft: #eff6ff; + --text-strong: #1f2937; + --text-body: #4b5563; + --text-muted: #9ca3af; + --border-color: #e5e7eb; + --r-card: 12px; + --r-control: 8px; + --fs-page: 17px; + --fs-body: 12px; + --fs-tag: 11px; + background: #ffffff !important; border: 1px solid var(--border-color) !important; border-radius: var(--r-card) !important; @@ -1647,6 +1662,50 @@ body.teacher-light-mode { font-size: var(--fs-body); } + // 输入框 / 选择器外壳:白底灰边(覆盖 admin-theme.scss 的深色 wrapper 残留) + // select 边框在 .el-select__wrapper 上,必须与 .el-input__wrapper 同步覆盖 + .el-input__wrapper, + .el-select__wrapper, + .el-select .el-input__wrapper, + .el-textarea__inner { + background: #ffffff !important; + background-image: none !important; + border: 1px solid var(--border-color) !important; + box-shadow: none !important; + + &:hover { + border-color: #d1d5db !important; + } + + &.is-focus, + &.is-focused, + &:focus-within { + border-color: var(--edu-primary) !important; + box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12) !important; + } + } + + // 禁用态:浅灰底 + .el-input.is-disabled .el-input__wrapper, + .el-select .el-select__wrapper.is-disabled, + .el-select.is-disabled .el-select__wrapper { + background: #f3f4f6 !important; + border-color: var(--border-color) !important; + } + + // select 选中值 / placeholder 文字颜色(覆盖 admin-theme 暗色残留) + .el-select__placeholder, + .el-select__selected-item, + .el-select__input { + color: var(--text-strong) !important; + } + + .el-select__placeholder.is-transparent, + .el-input__inner::placeholder, + .el-textarea__inner::placeholder { + color: var(--text-muted) !important; + } + // input / textarea / select 文字 .el-input__inner, .el-textarea__inner { @@ -1713,6 +1772,28 @@ body.teacher-light-mode { } } + // 主按钮(保存/提交):方案 A 实心深蓝,恢复被上方默认兜底漂白的 primary + .el-button--primary:not(.is-text):not(.is-link) { + background: #2563eb !important; + background-image: none !important; + border-color: #2563eb !important; + color: #ffffff !important; + box-shadow: 0 1px 2px rgba(37, 99, 235, 0.35) !important; + + &:hover, + &:focus { + background: #1d4ed8 !important; + border-color: #1d4ed8 !important; + color: #ffffff !important; + } + + &.is-disabled { + background: #93c5fd !important; + border-color: #93c5fd !important; + color: #ffffff !important; + } + } + // ===== radio-button(题型选择器):教育风蓝色选中 ===== // 注意:不能用 --el-color-primary CSS 变量,因为 html.dark 可能设成暗色 #00aaff, // 必须显式写 var(--edu-primary) 让 teacher-light-mode 令牌生效 diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 2d760b9..9e40b77 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -1,5 +1,5 @@