分离识别结果标签页;限制 DMA 数量最大数量

This commit is contained in:
JIANG
2026-03-06 10:15:47 +08:00
parent 377fc32f4c
commit 5430a9d885
4 changed files with 292 additions and 179 deletions
@@ -120,11 +120,19 @@ const AnalysisParameters: React.FC<Props> = ({ onResult }) => {
value={dmaCount}
onChange={(e) => {
const value = Number.parseInt(e.target.value, 10);
setDmaCount(Number.isNaN(value) ? 5 : Math.max(3, value));
// Limit between 3 and 10
if (Number.isNaN(value)) {
setDmaCount(5);
} else if (value > 10) {
setDmaCount(10);
} else {
setDmaCount(Math.max(3, value));
}
}}
fullWidth
size="small"
inputProps={{ min: 3, step: 1 }}
inputProps={{ min: 3, max: 10, step: 1 }}
helperText="DMA 数量限制为 3-10 个"
/>
</Box>