fix(runtime-dom): should remove attribute when binding null to value (#3564)

This commit is contained in:
GU Yiling
2021-05-29 03:48:22 +08:00
committed by GitHub
parent 071986a2c6
commit e3f5dcb99b
2 changed files with 17 additions and 0 deletions

View File

@@ -33,6 +33,9 @@ export function patchDOMProp(
if (el.value !== newValue) {
el.value = newValue
}
if (value == null) {
el.removeAttribute('value')
}
return
}