From 133a6dc4b45f64c3b24c4af0652fedf209dd1abd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B0=E5=9D=97?= Date: Mon, 25 Mar 2019 17:16:38 +0800 Subject: [PATCH] Fixed the problem that return value is an empty string when the form element is a single radio --- src/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.js b/src/utils.js index bfa6cf9a..a54aedb8 100644 --- a/src/utils.js +++ b/src/utils.js @@ -92,7 +92,7 @@ export function getValueFromEvent(e) { return e; } const { target } = e; - return target.type === 'checkbox' ? target.checked : target.value; + return target.type === 'checkbox' || target.type === 'radio' ? target.checked : target.value; } export function getErrorStrs(errors) {