fix: tabs disabled not work #3366

pull/3379/head
tangjinzhou 2020-12-15 16:27:35 +08:00
parent 1896bb9b77
commit 2c559ea059
1 changed files with 2 additions and 2 deletions

View File

@ -42,10 +42,10 @@ function resolvePropValue(options, props, key, value) {
value = opt.type !== Function && isFunction(defaultValue) ? defaultValue() : defaultValue; value = opt.type !== Function && isFunction(defaultValue) ? defaultValue() : defaultValue;
} }
// boolean casting // boolean casting
if (opt[0 /* shouldCast */]) { if (opt.type === Boolean) {
if (!hasOwn(props, key) && !hasDefault) { if (!hasOwn(props, key) && !hasDefault) {
value = false; value = false;
} else if (opt[1 /* shouldCastTrue */] && (value === '' || value === hyphenate(key))) { } else if (value === '') {
value = true; value = true;
} }
} }