fix: edit channel weight and priority

This commit is contained in:
CalciumIon
2024-12-09 21:26:17 +08:00
parent 56ccb30a94
commit cf8b30edfa

View File

@@ -964,7 +964,12 @@ const EditChannel = (props) => {
name="priority"
placeholder={'渠道优先级'}
onChange={(value) => {
handleInputChange('priority', parseInt(value));
const number = parseInt(value);
if (isNaN(number)) {
handleInputChange('priority', value);
} else {
handleInputChange('priority', number);
}
}}
value={inputs.priority}
autoComplete="new-password"
@@ -979,7 +984,12 @@ const EditChannel = (props) => {
name="weight"
placeholder={'渠道权重'}
onChange={(value) => {
handleInputChange('weight', parseInt(value));
const number = parseInt(value);
if (isNaN(number)) {
handleInputChange('weight', value);
} else {
handleInputChange('weight', number);
}
}}
value={inputs.weight}
autoComplete="new-password"