|
|
|
|
|
<template>
|
|
|
|
|
|
<!--
|
|
|
|
|
|
教师端任务评阅右侧预览(脱离 Layout 的独立路由,不渲染顶栏/侧栏)。
|
|
|
|
|
|
|
|
|
|
|
|
必须补齐 .studentLayout 与 section.app-main 两级祖先:
|
|
|
|
|
|
学生端实训页的「新版皮肤」全部以
|
|
|
|
|
|
#app .studentLayout section.app-main:has(.xxx-page) …
|
|
|
|
|
|
作为样式门控前缀。本路由没有走 Layout,天然缺少这两级祖先,
|
|
|
|
|
|
会导致这些新样式集体失配,页面静默退化到全局旧版样式
|
|
|
|
|
|
(步骤导航变 100% 宽竖排、步骤说明文字重新出现、动作按钮配色不一致)。
|
|
|
|
|
|
这里只补空壳容器,不引入顶栏、侧栏或 TagsView。
|
|
|
|
|
|
-->
|
|
|
|
|
|
<div class="studentLayout student-task-preview-root">
|
|
|
|
|
|
<section class="app-main">
|
|
|
|
|
|
<main ref="previewRoot" class="student-task-readonly-preview" @click.capture="guardPreviewInteraction" @keydown.capture="guardPreviewInteraction">
|
|
|
|
|
|
<component v-if="previewComponent" :is="previewComponent" v-bind="previewProps" />
|
|
|
|
|
|
<el-empty v-else :description="emptyDescription" :image-size="112" />
|
|
|
|
|
|
</main>
|
|
|
|
|
|
</section>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
|
|
import { ElMessage } from "element-plus";
|
|
|
|
|
|
import { getTrainingReviewPreviewContext } from "@/utils/trainingReviewPreview";
|
|
|
|
|
|
import { studentTaskPreviewComponentByKey, studentTaskPreviewPropsByKey } from "./studentTaskPreviewMap";
|
|
|
|
|
|
|
|
|
|
|
|
const route = useRoute();
|
|
|
|
|
|
const previewComponent = shallowRef(null);
|
|
|
|
|
|
const previewProps = ref({});
|
|
|
|
|
|
const emptyDescription = ref("正在加载学生任务页面");
|
|
|
|
|
|
const previewRoot = ref();
|
|
|
|
|
|
const PREVIEW_HEIGHT_MESSAGE = "teacher-task-review-preview-height";
|
|
|
|
|
|
let resizeObserver;
|
|
|
|
|
|
let mutationObserver;
|
|
|
|
|
|
let animationFrame;
|
|
|
|
|
|
|
|
|
|
|
|
async function loadPreview() {
|
|
|
|
|
|
previewComponent.value = null;
|
|
|
|
|
|
const taskKey = String(route.query.taskKey || "");
|
|
|
|
|
|
const preview = getTrainingReviewPreviewContext();
|
|
|
|
|
|
const loader = studentTaskPreviewComponentByKey[taskKey];
|
|
|
|
|
|
if (!preview || preview.taskKey !== taskKey) {
|
|
|
|
|
|
emptyDescription.value = "学生作答预览已失效,请返回任务评阅重新选择学生";
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!loader) {
|
|
|
|
|
|
emptyDescription.value = "该实训任务暂不支持页面预览";
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
try {
|
|
|
|
|
|
previewComponent.value = (await loader()).default;
|
|
|
|
|
|
previewProps.value = studentTaskPreviewPropsByKey[taskKey]?.(taskKey) || {};
|
|
|
|
|
|
await nextTick();
|
|
|
|
|
|
schedulePreviewHeight();
|
|
|
|
|
|
} catch (_) {
|
|
|
|
|
|
emptyDescription.value = "学生任务页面加载失败,请刷新后重试";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
watch(() => [route.query.taskKey, route.query.reviewPreviewKey], loadPreview, { immediate: true });
|
|
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
|
resizeObserver = new ResizeObserver(schedulePreviewHeight);
|
|
|
|
|
|
if (previewRoot.value) resizeObserver.observe(previewRoot.value);
|
|
|
|
|
|
mutationObserver = new MutationObserver(schedulePreviewHeight);
|
|
|
|
|
|
if (previewRoot.value) mutationObserver.observe(previewRoot.value, { childList: true, subtree: true });
|
|
|
|
|
|
schedulePreviewHeight();
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
onBeforeUnmount(() => {
|
|
|
|
|
|
resizeObserver?.disconnect();
|
|
|
|
|
|
mutationObserver?.disconnect();
|
|
|
|
|
|
if (animationFrame) cancelAnimationFrame(animationFrame);
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
function schedulePreviewHeight() {
|
|
|
|
|
|
if (animationFrame) cancelAnimationFrame(animationFrame);
|
|
|
|
|
|
animationFrame = requestAnimationFrame(reportPreviewHeight);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function reportPreviewHeight() {
|
|
|
|
|
|
animationFrame = 0;
|
|
|
|
|
|
const height = Math.ceil(Math.max(
|
|
|
|
|
|
previewRoot.value?.scrollHeight || 0,
|
|
|
|
|
|
document.body?.scrollHeight || 0,
|
|
|
|
|
|
document.documentElement?.scrollHeight || 0,
|
|
|
|
|
|
window.innerHeight || 0,
|
|
|
|
|
|
));
|
|
|
|
|
|
window.parent?.postMessage({
|
|
|
|
|
|
type: PREVIEW_HEIGHT_MESSAGE,
|
|
|
|
|
|
previewKey: String(route.query.reviewPreviewKey || ""),
|
|
|
|
|
|
height,
|
|
|
|
|
|
}, window.location.origin);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function guardPreviewInteraction(event) {
|
|
|
|
|
|
const target = event.target instanceof Element ? event.target : null;
|
|
|
|
|
|
if (!target) return;
|
|
|
|
|
|
if (target.closest("input, textarea, select, [contenteditable='true'], .el-input, .el-textarea, .el-select, .el-checkbox, .el-radio, .el-switch")) {
|
|
|
|
|
|
event.preventDefault();
|
|
|
|
|
|
event.stopImmediatePropagation();
|
|
|
|
|
|
notifyReadonly();
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
const action = target.closest("button, a, [role='button'], [role='tab'], .el-step");
|
|
|
|
|
|
if (action && !isStepNavigation(action)) {
|
|
|
|
|
|
event.preventDefault();
|
|
|
|
|
|
event.stopImmediatePropagation();
|
|
|
|
|
|
notifyReadonly();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
* 步骤导航容器白名单:
|
|
|
|
|
|
* 只靠文案(第N步/上一步/下一步)判断太窄——行业需求分析、竞争环境分析等页面的步骤胶囊
|
|
|
|
|
|
* 文案是「01 PEST宏观环境分析 切换 →」,不匹配任何关键词,会被当成普通按钮拦掉,
|
|
|
|
|
|
* 表现为「点了没反应、也不报错」。凡落在已知步骤导航容器里的控件一律放行。
|
|
|
|
|
|
*/
|
|
|
|
|
|
const PREVIEW_STEP_NAV_CONTAINER = [
|
|
|
|
|
|
".step-indicator",
|
|
|
|
|
|
".step-tabs",
|
|
|
|
|
|
".step-nav",
|
|
|
|
|
|
".training-step-nav",
|
|
|
|
|
|
".comprehensive-step-nav",
|
|
|
|
|
|
".comprehensive-step-strip",
|
|
|
|
|
|
".flow-steps",
|
|
|
|
|
|
".flow-rail",
|
|
|
|
|
|
".training-intro__steps",
|
|
|
|
|
|
".top_item",
|
|
|
|
|
|
].join(",");
|
|
|
|
|
|
|
|
|
|
|
|
function isStepNavigation(element) {
|
|
|
|
|
|
if (element.matches("[role='tab'], .el-step")) return true;
|
|
|
|
|
|
if (element.closest(PREVIEW_STEP_NAV_CONTAINER)) return true;
|
|
|
|
|
|
const label = String(element.getAttribute("aria-label") || "");
|
|
|
|
|
|
const text = `${label} ${String(element.textContent || "")}`.replace(/\s+/g, " ").trim();
|
|
|
|
|
|
return /(上一步|下一步|第\s*\d+\s*步|步骤\s*\d+|切换.*步骤|步骤.*切换)/.test(text);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 只读态被拦截的操作要给提示,避免教师以为页面坏了 */
|
|
|
|
|
|
let lastReadonlyHintAt = 0;
|
|
|
|
|
|
function notifyReadonly() {
|
|
|
|
|
|
const now = Date.now();
|
|
|
|
|
|
if (now - lastReadonlyHintAt < 2500) return;
|
|
|
|
|
|
lastReadonlyHintAt = now;
|
|
|
|
|
|
ElMessage({
|
|
|
|
|
|
message: "任务评阅预览为只读模式,不能修改学生作答;步骤切换不受影响",
|
|
|
|
|
|
type: "info",
|
|
|
|
|
|
duration: 2000,
|
|
|
|
|
|
showClose: true,
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
|
/*
|
|
|
|
|
|
* 教师端任务评阅右侧预览:
|
|
|
|
|
|
* 学生页面已通过 dynamic component 嵌入,保留学生端样式;
|
|
|
|
|
|
* 仅保留步骤导航与步骤内容,隐藏标题区、任务简介、AI 助手与所有顶部/底部操作按钮(仅查看)。
|
|
|
|
|
|
*/
|
|
|
|
|
|
.student-task-readonly-preview {
|
|
|
|
|
|
background: #ffffff;
|
|
|
|
|
|
font-family: var(--student-font-base, "PingFang SC", "Source Han Sans SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* ===== 1. 隐藏 AI 助手、AI 评测、独立的 TrainingTaskBrief 组件(保持原行为) ===== */
|
|
|
|
|
|
.student-task-readonly-preview :deep(.training-ai-sidebar),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.training-ai-evaluation),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.training-task-brief) { display: none !important; }
|
|
|
|
|
|
|
|
|
|
|
|
/* ===== 2. 隐藏学生页顶部 chrome(标题、任务简介、展开/收起按钮、顶部工具栏等) ===== */
|
|
|
|
|
|
.student-task-readonly-preview :deep(.task-header),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.task-head-main),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.task-brief),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.task-brief-toggle),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.task-brief-more),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.workbench-head),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.workbench-head--actions-only),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.workbench-actions),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.task-action-strip),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.training-task-toolbar),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.training-legacy-actions),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.new-product-survey-toolbar),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.comprehensive-training-toolbar),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.release-channel-toolbar),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.purchase-workbench) > .workbench-head,
|
|
|
|
|
|
.student-task-readonly-preview :deep(.process-workbench) > .workbench-head,
|
|
|
|
|
|
.student-task-readonly-preview :deep(.factors-workbench) > .workbench-head,
|
|
|
|
|
|
.student-task-readonly-preview :deep(.channel-toolbar),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.supplier-toolbar),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.promotion-toolbar),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.hardware-workbench-head),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.legacy-toolbar),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.material-actions) { display: none !important; }
|
|
|
|
|
|
|
|
|
|
|
|
/* ===== 2.1 旧版实训页:隐藏 TrainingIntro 组件的标题/简介,仅保留其步骤导航 ===== */
|
|
|
|
|
|
.student-task-readonly-preview :deep(.training-intro__head),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.training-intro__body) { display: none !important; }
|
|
|
|
|
|
.student-task-readonly-preview :deep(.training-intro) {
|
|
|
|
|
|
margin-bottom: 12px !important;
|
|
|
|
|
|
padding: 0 !important;
|
|
|
|
|
|
border: 0 !important;
|
|
|
|
|
|
border-radius: 0 !important;
|
|
|
|
|
|
background: transparent !important;
|
|
|
|
|
|
box-shadow: none !important;
|
|
|
|
|
|
overflow: visible !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
.student-task-readonly-preview :deep(.training-intro__steps.step-indicator) { margin: 4px 0 18px !important; }
|
|
|
|
|
|
|
|
|
|
|
|
/* ===== 2.2 旧版实训页:top_item 是 section 切换 tab,保留作为步骤导航 ===== */
|
|
|
|
|
|
.student-task-readonly-preview :deep(.top_item) {
|
|
|
|
|
|
margin: 0 0 14px !important;
|
|
|
|
|
|
padding: 0 !important;
|
|
|
|
|
|
border: 0 !important;
|
|
|
|
|
|
background: transparent !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* ===== 3. 让学生页面把 AI 侧栏所在的网格列收回,让预览通栏展示 ===== */
|
|
|
|
|
|
.student-task-readonly-preview :deep(.student-training-shell) { grid-template-columns: minmax(0, 1fr) !important; }
|
|
|
|
|
|
|
|
|
|
|
|
/* ===== 4. 紧贴 app-main 内边距,复用学生端整体留白 ===== */
|
|
|
|
|
|
.student-task-readonly-preview :deep(.student-training-shell) > main { padding: 14px 16px 24px !important; }
|
|
|
|
|
|
|
|
|
|
|
|
/* ===== 5. 步骤导航横排、并与学生端胶囊样式一致 ===== */
|
|
|
|
|
|
.student-task-readonly-preview :deep(.step-indicator),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.comprehensive-step-nav),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.comprehensive-step-strip),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.step-tabs),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.flow-steps),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.flow-rail),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.training-intro__steps) {
|
|
|
|
|
|
display: flex !important;
|
|
|
|
|
|
flex-direction: row !important;
|
|
|
|
|
|
flex-wrap: nowrap !important;
|
|
|
|
|
|
align-items: stretch !important;
|
|
|
|
|
|
justify-content: flex-start !important;
|
|
|
|
|
|
gap: 0 !important;
|
|
|
|
|
|
width: 100% !important;
|
|
|
|
|
|
max-width: 100% !important;
|
|
|
|
|
|
margin: 4px 0 18px !important;
|
|
|
|
|
|
padding: 0 !important;
|
|
|
|
|
|
border: none !important;
|
|
|
|
|
|
border-radius: 0 !important;
|
|
|
|
|
|
background: transparent !important;
|
|
|
|
|
|
box-shadow: none !important;
|
|
|
|
|
|
overflow-x: auto !important;
|
|
|
|
|
|
overflow-y: hidden !important;
|
|
|
|
|
|
scrollbar-width: thin !important;
|
|
|
|
|
|
-webkit-overflow-scrolling: touch !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 步骤胶囊:固定宽度并排,不让任何一条占满整行 */
|
|
|
|
|
|
.student-task-readonly-preview :deep(.step-indicator) .step-tab,
|
|
|
|
|
|
.student-task-readonly-preview :deep(.comprehensive-step-strip) .step-tab,
|
|
|
|
|
|
.student-task-readonly-preview :deep(.step-tabs) .step-tab,
|
|
|
|
|
|
.student-task-readonly-preview :deep(.step-tabs) .step-pill,
|
|
|
|
|
|
.student-task-readonly-preview :deep(.step-indicator) .flow-pill,
|
|
|
|
|
|
.student-task-readonly-preview :deep(.flow-steps) .step-pill,
|
|
|
|
|
|
.student-task-readonly-preview :deep(.flow-rail) .flow-step,
|
|
|
|
|
|
.student-task-readonly-preview :deep(.training-intro__steps) .step-tab {
|
|
|
|
|
|
flex: 0 0 auto !important;
|
|
|
|
|
|
flex-grow: 0 !important;
|
|
|
|
|
|
flex-shrink: 0 !important;
|
|
|
|
|
|
flex-basis: auto !important;
|
|
|
|
|
|
width: auto !important;
|
|
|
|
|
|
min-width: 132px !important;
|
|
|
|
|
|
max-width: 220px !important;
|
|
|
|
|
|
margin: 0 !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.student-task-readonly-preview :deep(.comprehensive-step-strip) {
|
|
|
|
|
|
width: max-content !important;
|
|
|
|
|
|
min-width: 100% !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.student-task-readonly-preview :deep(.step-connector),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.step-arrow),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.flow-arrow) {
|
|
|
|
|
|
flex: 0 0 22px !important;
|
|
|
|
|
|
width: 22px !important;
|
|
|
|
|
|
min-width: 22px !important;
|
|
|
|
|
|
display: inline-block !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* ===== 6. 步骤内容卡片:保留学生端白卡 + 灰边样式 ===== */
|
|
|
|
|
|
.student-task-readonly-preview :deep(.step-card),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.industry-step-card),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.process-step-card),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.factor-step-card),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.step-content > .step-card),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.training-step-area) {
|
|
|
|
|
|
border: 1px solid #e5e7eb !important;
|
|
|
|
|
|
border-radius: 12px !important;
|
|
|
|
|
|
background: #ffffff !important;
|
|
|
|
|
|
box-shadow: none !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* ===== 7. 关闭底部"提交/导出/清空"等动作按钮区(仅查看,不需要学生端的提交动作) ===== */
|
|
|
|
|
|
.student-task-readonly-preview :deep(.task-actions),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.task-actions-row),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.taskfooter),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.step-footer),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.step-actions),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.footer-actions) {
|
|
|
|
|
|
pointer-events: none !important;
|
|
|
|
|
|
opacity: 0.55 !important;
|
|
|
|
|
|
filter: grayscale(0.4) !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* ===== 8. 禁用所有表单交互,确保仅查看 ===== */
|
|
|
|
|
|
.student-task-readonly-preview :deep(input),
|
|
|
|
|
|
.student-task-readonly-preview :deep(textarea),
|
|
|
|
|
|
.student-task-readonly-preview :deep(select),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.el-input__inner),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.el-textarea__inner),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.el-select) { pointer-events: none !important; }
|
|
|
|
|
|
|
|
|
|
|
|
/* ===== 9. 隐藏通用浮层与弹窗,避免误触 ===== */
|
|
|
|
|
|
.student-task-readonly-preview :deep(.gdialog),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.popModal),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.el-popper),
|
|
|
|
|
|
.student-task-readonly-preview :deep(.el-overlay) { display: none !important; }
|
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
|
|
<!--
|
|
|
|
|
|
非 scoped:补齐 .studentLayout / section.app-main 空壳祖先之后,
|
|
|
|
|
|
需要压掉布局级背景与内边距;同时复位窄屏媒体查询。
|
|
|
|
|
|
|
|
|
|
|
|
选择器统一带 #app + .student-task-preview-root,确保 ID 级特异性高于
|
|
|
|
|
|
student-training.scss / sidebar.scss 里的
|
|
|
|
|
|
#app .studentLayout .app-main:has(.student-training-shell) …
|
|
|
|
|
|
这类规则,避免预览壳被学生端布局背景与内边距污染。
|
|
|
|
|
|
-->
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
|
#app .studentLayout.student-task-preview-root {
|
|
|
|
|
|
min-height: 0 !important;
|
|
|
|
|
|
background: #ffffff !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#app .studentLayout.student-task-preview-root .app-main,
|
|
|
|
|
|
#app .studentLayout.student-task-preview-root .app-main:has(.student-training-shell) {
|
|
|
|
|
|
height: auto !important;
|
|
|
|
|
|
min-height: 0 !important;
|
|
|
|
|
|
padding: 0 !important;
|
|
|
|
|
|
overflow: visible !important;
|
|
|
|
|
|
background: #ffffff !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
评阅预览的 iframe 宽度约 1000px(左栏 440~520px + 右栏自适应),
|
|
|
|
|
|
会命中 student-training.scss 的 @media (max-width: 1100px):
|
|
|
|
|
|
.student-training-shell .step-indicator { flex-direction: column }
|
|
|
|
|
|
#app .student-training-shell .step-tab { width: 100% }
|
|
|
|
|
|
后者带 #app(ID 级特异性),会压过本组件 :deep() 里的宽度覆盖,
|
|
|
|
|
|
于是预览里的步骤胶囊被撑成整行、只剩第一个可见(横向滚动条)。
|
|
|
|
|
|
预览需要呈现学生端「桌面端」外观,这里用更高特异性把宽度复位。
|
|
|
|
|
|
*/
|
|
|
|
|
|
#app .student-task-preview-root .step-indicator .step-tab,
|
|
|
|
|
|
#app .student-task-preview-root .step-tabs .step-tab,
|
|
|
|
|
|
#app .student-task-preview-root .comprehensive-step-strip .step-tab,
|
|
|
|
|
|
#app .student-task-preview-root .training-intro__steps .step-tab,
|
|
|
|
|
|
#app .student-task-preview-root .step-indicator .flow-pill,
|
|
|
|
|
|
#app .student-task-preview-root .flow-steps .flow-pill,
|
|
|
|
|
|
#app .student-task-preview-root .flow-rail .flow-step,
|
|
|
|
|
|
#app .student-task-preview-root .training-actions .el-button.training-action,
|
|
|
|
|
|
#app .student-task-preview-root .training-actions button.training-action {
|
|
|
|
|
|
width: auto !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|