Commit 2a2ac802 by CalciumIon

fix: edit channel weight and priority

parent 727236e6
...@@ -964,7 +964,12 @@ const EditChannel = (props) => { ...@@ -964,7 +964,12 @@ const EditChannel = (props) => {
name="priority" name="priority"
placeholder={'渠道优先级'} placeholder={'渠道优先级'}
onChange={(value) => { onChange={(value) => {
handleInputChange('priority', parseInt(value)); const number = parseInt(value);
if (isNaN(number)) {
handleInputChange('priority', value);
} else {
handleInputChange('priority', number);
}
}} }}
value={inputs.priority} value={inputs.priority}
autoComplete="new-password" autoComplete="new-password"
...@@ -979,7 +984,12 @@ const EditChannel = (props) => { ...@@ -979,7 +984,12 @@ const EditChannel = (props) => {
name="weight" name="weight"
placeholder={'渠道权重'} placeholder={'渠道权重'}
onChange={(value) => { onChange={(value) => {
handleInputChange('weight', parseInt(value)); const number = parseInt(value);
if (isNaN(number)) {
handleInputChange('weight', value);
} else {
handleInputChange('weight', number);
}
}} }}
value={inputs.weight} value={inputs.weight}
autoComplete="new-password" autoComplete="new-password"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment