fix: edit channel weight and priority
This commit is contained in:
@@ -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) => {
|
|||||||
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"
|
||||||
|
|||||||
Reference in New Issue
Block a user