diff --git a/src/views/foundation/new-product-survey.vue b/src/views/foundation/new-product-survey.vue index a2d532a..d40f6b7 100644 --- a/src/views/foundation/new-product-survey.vue +++ b/src/views/foundation/new-product-survey.vue @@ -86,7 +86,7 @@
-
+

Step 02

@@ -1356,6 +1356,33 @@ function exportOutcome() { gap: 9px; } +.step-two-survey { + .step-title-row { + h3 { + font-size: 19px; + } + } + + .survey-options { + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 8px; + } + + :deep(.survey-option.el-radio) { + padding: 8px 10px; + + .el-radio__label { + gap: 2px; + padding-left: 7px; + } + + span { + font-size: 11px; + line-height: 1.35; + } + } +} + :deep(.survey-option.el-radio) { display: grid; grid-template-columns: auto 1fr; @@ -1800,6 +1827,12 @@ function exportOutcome() { min-width: 720px; } } - - +@media (max-width: 720px) { + .step-two-survey { + .survey-options { + grid-template-columns: 1fr; + } + } +} + diff --git a/tests/new-product-survey-step2.static.test.cjs b/tests/new-product-survey-step2.static.test.cjs new file mode 100644 index 0000000..c0a9fae --- /dev/null +++ b/tests/new-product-survey-step2.static.test.cjs @@ -0,0 +1,15 @@ +const assert = require("node:assert/strict"); +const fs = require("node:fs"); +const path = require("node:path"); +const test = require("node:test"); + +const source = fs.readFileSync(path.join(__dirname, "../src/views/foundation/new-product-survey.vue"), "utf8"); + +test("实训一第二步标题与短选项采用紧凑双列布局", () => { + assert.match(source, /
[\s\S]*?
/); + const stepOne = source.match(/
([\s\S]*?)<\/section>/)?.[1] || ""; + assert.doesNotMatch(stepOne, /step-two-survey/); + assert.match(source, /\.step-two-survey\s*\{[\s\S]*?\.step-title-row\s*\{[\s\S]*?h3\s*\{[\s\S]*?font-size:\s*19px/); + assert.match(source, /\.step-two-survey\s*\{[\s\S]*?\.survey-options\s*\{[\s\S]*?grid-template-columns:\s*repeat\(2, minmax\(0, 1fr\)\)/); + assert.match(source, /@media \(max-width: 720px\)\s*\{[\s\S]*?\.step-two-survey\s*\{[\s\S]*?\.survey-options\s*\{[\s\S]*?grid-template-columns:\s*1fr/); +});