分离识别结果标签页;限制 DMA 数量最大数量
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user