style: 统一代码缩进与格式,修复模板头部空格问题

本次提交调整了多处文件的代码格式:
1. 修复了两个vue页面模板开头的多余空格问题
2. 统一了导航组件的缩进风格,修正了菜单列表的换行格式
3. 统一了scoped样式块的缩进与换行规范,提升代码可读性
fix/exam-question-access-material-excel-delete-draft
qinzhenpen 3 weeks ago
parent 1804e3fa58
commit 569839be27

@ -64,10 +64,10 @@
<div :class="['el-ment', { 'platform-nav': role === 1 || role === 2, 'school-admin-nav': role === 2, 'teacher-nav': role === 3 }]">
<template v-for="item in roleList" :key="item.name">
<div :class="['el-ment-item', { 'el-ment-item-active': isActive(item) }]" @click="go(item)">
<span class="menu-indicator"></span>
<el-icon v-if="role === 4 && item.icon" class="menu-ico"><component :is="item.icon" /></el-icon>
<span class="menu-text">{{ item.name }}</span>
<div :class="['el-ment-item', { 'el-ment-item-active': isActive(item) }]" @click="go(item)">
<span class="menu-indicator"></span>
<el-icon v-if="role === 4 && item.icon" class="menu-ico"><component :is="item.icon" /></el-icon>
<span class="menu-text">{{ item.name }}</span>
</div>
</template>
</div>
@ -116,7 +116,7 @@
</template>
<script setup>
import { ElMessageBox } from "element-plus";
import { ElMessageBox } from "element-plus";
import { HomeFilled, Reading, Document, TrendCharts, DataLine } from "@element-plus/icons-vue";
import Breadcrumb from "@/components/Breadcrumb";
import TopNav from "@/components/TopNav";
@ -146,28 +146,28 @@ const roleText = computed(() => {
const studentTopTask = ref(null);
const mentList = ref([
{ name: "首页", path: "/index", icon: HomeFilled },
{ name: "学校管理", path: "/platform-schools/index", role: 1, activePrefix: "/platform-schools" },
{ name: "教师管理", path: "/platform-teachers/index", role: 1, activePrefix: "/platform-teachers" },
{ name: "实训任务管理", path: "/platform-training-task/index", role: 1, activePrefix: "/platform-training-task" },
{ name: "院系管理", path: "/admin-faculty/index", role: 2, activePrefix: "/admin-faculty" },
{ name: "专业管理", path: "/admin-major/index", role: 2, activePrefix: "/admin-major" },
{ name: "班级管理", path: "/admin-class/index", role: 2, activePrefix: "/admin-class" },
{ name: "教师管理", path: "/admin-teacher/index", role: 2, activePrefix: "/admin-teacher" },
{ name: "学生管理", path: "/admin-student/index", role: 2, activePrefix: "/admin-student" },
{ name: "考试考核", path: "/examination/index", role: 4, activePrefix: "/examination" },
{ name: "实验报告", path: "/report/index", role: 4, icon: Document },
{ name: "BI可视化", path: "/bi", role: 4, icon: TrendCharts },
{ name: "AI学情分析", path: "/analysis/index", icon: DataLine },
{ name: "AI实训教案", path: "/ai/teaching-plan", role: 3 },
{ name: "院系管理", path: "/school/index", role: 3, teacherMenu: true, activePrefix: "/school" },
{ name: "专业管理", path: "/major/index", role: 3, teacherMenu: true, activePrefix: "/major" },
{ name: "班级管理", path: "/class/index", role: 3, teacherMenu: true, activePrefix: "/class" },
{ name: "教师管理", path: "/teacher/index", role: 3, teacherMenu: true, activePrefix: "/teacher" },
{ name: "学生管理", path: "/student/index", role: 3, teacherMenu: true, activePrefix: "/student" },
{ name: "任务分配", path: "/task/index", role: 3, teacherMenu: true, activePrefix: "/task" },
{ name: "成绩中心", path: "/score/index", role: 3, teacherMenu: true, activePrefix: "/score" },
const mentList = ref([
{ name: "首页", path: "/index", icon: HomeFilled },
{ name: "学校管理", path: "/platform-schools/index", role: 1, activePrefix: "/platform-schools" },
{ name: "教师管理", path: "/platform-teachers/index", role: 1, activePrefix: "/platform-teachers" },
{ name: "实训任务管理", path: "/platform-training-task/index", role: 1, activePrefix: "/platform-training-task" },
{ name: "院系管理", path: "/admin-faculty/index", role: 2, activePrefix: "/admin-faculty" },
{ name: "专业管理", path: "/admin-major/index", role: 2, activePrefix: "/admin-major" },
{ name: "班级管理", path: "/admin-class/index", role: 2, activePrefix: "/admin-class" },
{ name: "教师管理", path: "/admin-teacher/index", role: 2, activePrefix: "/admin-teacher" },
{ name: "学生管理", path: "/admin-student/index", role: 2, activePrefix: "/admin-student" },
{ name: "考试考核", path: "/examination/index", role: 4, activePrefix: "/examination" },
{ name: "实验报告", path: "/report/index", role: 4, icon: Document },
{ name: "BI可视化", path: "/bi", role: 4, icon: TrendCharts },
{ name: "AI学情分析", path: "/analysis/index", icon: DataLine },
{ name: "AI实训教案", path: "/ai/teaching-plan", role: 3 },
{ name: "院系管理", path: "/school/index", role: 3, teacherMenu: true, activePrefix: "/school" },
{ name: "专业管理", path: "/major/index", role: 3, teacherMenu: true, activePrefix: "/major" },
{ name: "班级管理", path: "/class/index", role: 3, teacherMenu: true, activePrefix: "/class" },
{ name: "教师管理", path: "/teacher/index", role: 3, teacherMenu: true, activePrefix: "/teacher" },
{ name: "学生管理", path: "/student/index", role: 3, teacherMenu: true, activePrefix: "/student" },
{ name: "任务分配", path: "/task/index", role: 3, teacherMenu: true, activePrefix: "/task" },
{ name: "成绩中心", path: "/score/index", role: 3, teacherMenu: true, activePrefix: "/score" },
]);
const activement = ref(mentList.value[0]);
@ -676,111 +676,111 @@ onMounted(() => {
}
}
// ===== 学生端顶部:墨黑极简(与 AI 助学面板同体系)=====
.student-navbar {
background: #1f2937 !important;
border-bottom: 1px solid #374151;
box-shadow: none;
.nav-bg-decoration { display: none; }
// 品牌区:去渐变、去发光
.navTitle {
background: transparent;
.logo-area {
.logo-icon {
filter: none;
path, circle {
stroke: #ffffff;
}
path:first-child { fill: rgba(255, 255, 255, 0.12); }
}
.nacber-name {
color: #ffffff;
font-size: 15px;
font-weight: 600;
letter-spacing: 1px;
text-shadow: none;
}
}
}
// 导航菜单:浅灰文字,hover/active 用半透明白块
.el-ment {
color: #d1d5db;
.el-ment-item {
padding: 8px 16px;
gap: 6px;
border-radius: 8px;
transition: background 0.16s ease, color 0.16s ease;
.menu-indicator { display: none; }
.menu-ico { font-size: 15px; }
&:hover {
color: #ffffff;
background: rgba(255, 255, 255, 0.08);
transform: none;
}
}
.el-ment-item-active {
color: #ffffff;
background: rgba(255, 255, 255, 0.14);
box-shadow: none;
&::before { display: none; }
}
}
// 右侧操作区:去渐变、去彩色发光环
.right-menu {
background: transparent;
.search-box {
color: #d1d5db;
background: transparent;
border: 1px solid rgba(255, 255, 255, 0.2);
transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
&:hover {
color: #ffffff;
background: rgba(255, 255, 255, 0.1);
border-color: rgba(255, 255, 255, 0.32);
transform: none;
}
}
.divider { background: rgba(255, 255, 255, 0.15); }
.avatar-container .avatar-wrapper {
background: transparent;
border: 1px solid rgba(255, 255, 255, 0.2);
&:hover {
background: rgba(255, 255, 255, 0.08);
border-color: rgba(255, 255, 255, 0.32);
}
.avatar-ring {
padding: 0;
background: transparent;
box-shadow: none;
.user-avatar {
border: 1px solid rgba(255, 255, 255, 0.25);
}
}
.dropdown-icon { color: #d1d5db; }
}
}
}
// ===== 学生端顶部:墨黑极简(与 AI 助学面板同体系)=====
.student-navbar {
background: #1f2937 !important;
border-bottom: 1px solid #374151;
box-shadow: none;
.nav-bg-decoration { display: none; }
// 品牌区:去渐变、去发光
.navTitle {
background: transparent;
.logo-area {
.logo-icon {
filter: none;
path, circle {
stroke: #ffffff;
}
path:first-child { fill: rgba(255, 255, 255, 0.12); }
}
.nacber-name {
color: #ffffff;
font-size: 15px;
font-weight: 600;
letter-spacing: 1px;
text-shadow: none;
}
}
}
// 导航菜单:浅灰文字,hover/active 用半透明白块
.el-ment {
color: #d1d5db;
.el-ment-item {
padding: 8px 16px;
gap: 6px;
border-radius: 8px;
transition: background 0.16s ease, color 0.16s ease;
.menu-indicator { display: none; }
.menu-ico { font-size: 15px; }
&:hover {
color: #ffffff;
background: rgba(255, 255, 255, 0.08);
transform: none;
}
}
.el-ment-item-active {
color: #ffffff;
background: rgba(255, 255, 255, 0.14);
box-shadow: none;
&::before { display: none; }
}
}
// 右侧操作区:去渐变、去彩色发光环
.right-menu {
background: transparent;
.search-box {
color: #d1d5db;
background: transparent;
border: 1px solid rgba(255, 255, 255, 0.2);
transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
&:hover {
color: #ffffff;
background: rgba(255, 255, 255, 0.1);
border-color: rgba(255, 255, 255, 0.32);
transform: none;
}
}
.divider { background: rgba(255, 255, 255, 0.15); }
.avatar-container .avatar-wrapper {
background: transparent;
border: 1px solid rgba(255, 255, 255, 0.2);
&:hover {
background: rgba(255, 255, 255, 0.08);
border-color: rgba(255, 255, 255, 0.32);
}
.avatar-ring {
padding: 0;
background: transparent;
box-shadow: none;
.user-avatar {
border: 1px solid rgba(255, 255, 255, 0.25);
}
}
.dropdown-icon { color: #d1d5db; }
}
}
}
// 教师端下拉面板、学生端下拉面板已移至文件末尾非 scoped style 块
// 学生端下拉面板规则见文件末尾(置于基础块之后,避免被深色默认样式反压)

@ -1,4 +1,4 @@
<template>
<template>
<div class="channel student-training-shell">
<main class="training-core">
<section class="task-header">

File diff suppressed because it is too large Load Diff

@ -1,4 +1,4 @@
<template>
<template>
<div class="consumer-behavior-page student-training-shell">
<main class="training-core">
<section class="task-header">

@ -1467,23 +1467,23 @@ function exportOutcome() {
display: flex;
gap: 8px;
padding: 0 20px 14px;
border-bottom: 1px solid var(--student-panel-border);
border-bottom: 1px solid var(--student-panel-border, #e5e7eb);
button {
min-width: 52px;
height: 30px;
border: 1px solid var(--student-panel-border);
border: 1px solid var(--student-panel-border, #e5e7eb);
border-radius: 6px;
color: var(--student-text-secondary);
color: var(--student-text-secondary, #6b7280);
background: #ffffff;
cursor: pointer;
font-weight: 700;
font-size: 12px;
&.active {
border-color: var(--student-accent);
border-color: #1f2937;
color: #ffffff;
background: var(--student-accent);
background: #1f2937;
}
}
}
@ -1491,13 +1491,13 @@ function exportOutcome() {
.interview-dialog-body--panel {
max-height: 58vh;
padding: 20px;
color: var(--student-text);
color: var(--student-text, #1f2937);
font-size: 13px;
line-height: 1.65;
}
.interview-line, .interview-title, .interview-qa p { margin: 0; }
.interview-title { margin-top: 14px; color: var(--student-text); font-weight: 800; }
.interview-title { margin-top: 14px; color: var(--student-text, #1f2937); font-weight: 800; }
.interview-qa { margin-top: 10px; }
/* 画像表格 */

Loading…
Cancel
Save