修正Switch组件使用Form传递内容的问题。
This commit is contained in:
		| @@ -31,9 +31,7 @@ export function Switch({ name, checked = false, disabled = false, onChange }: Sw | ||||
|       <div | ||||
|         className={cx(styles.switch_handle, isChecked && styles.checked)} | ||||
|         onClick={handleSwitch}></div> | ||||
|       {!isNil(name) && ( | ||||
|         <input type="hidden" name={name} value={isChecked ? 'checked' : undefined} /> | ||||
|       )} | ||||
|       {!isNil(name) && <input type="hidden" name={name} value={isChecked ? 'true' : 'false'} />} | ||||
|     </div> | ||||
|   ); | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user