style: compact new product survey options

master
陈沅 4 days ago
parent 1c37b6f055
commit 01ca54cda2

@ -86,7 +86,7 @@
</section>
<section v-show="currentStep === 2" class="step-content active-step">
<div class="step-card">
<div class="step-card step-two-survey">
<div class="step-title-row">
<div>
<p class="section-eyebrow">Step 02</p>
@ -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;
}
}
</style>
@media (max-width: 720px) {
.step-two-survey {
.survey-options {
grid-template-columns: 1fr;
}
}
}
</style>

@ -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, /<section v-show="currentStep === 2" class="step-content active-step">[\s\S]*?<div class="step-card step-two-survey">/);
const stepOne = source.match(/<section v-show="currentStep === 1" class="step-content active-step">([\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/);
});
Loading…
Cancel
Save