修复演化页 Tab 无响应:匹配页 Tab 处理器未限定作用域,onclick 覆盖演化页处理器

This commit is contained in:
RoyirinRosmontis
2026-08-19 15:55:56 +08:00
parent ef9fe9faa3
commit 07bd9e12fd
+3 -3
View File
@@ -1454,9 +1454,9 @@ function drawRadar(canvas, dims) {
const batchState = { files: [], result: null };
/* 子页签切换 */
$$(".match-tab").forEach((b) => {
$$("#view-match .match-tab").forEach((b) => {
b.onclick = () => {
$$(".match-tab").forEach((x) => x.classList.toggle("active", x === b));
$$("#view-match .match-tab").forEach((x) => x.classList.toggle("active", x === b));
$("#match-single").classList.toggle("hidden", b.dataset.mtab !== "single");
$("#match-batch").classList.toggle("hidden", b.dataset.mtab !== "batch");
};
@@ -1913,7 +1913,7 @@ const DEMO_STEPS = [
desc: "载入示例简历 → 解析确认 → 匹配结论 / 核心缺口 / 可迁移能力",
go: async () => {
switchView("match");
$$(".match-tab").forEach((x) => x.classList.toggle("active", x.dataset.mtab === "single"));
$$("#view-match .match-tab").forEach((x) => x.classList.toggle("active", x.dataset.mtab === "single"));
$("#match-single").classList.remove("hidden");
$("#match-batch").classList.add("hidden");
$("#match-job-select").value = DEMO_JOB;