Skip to content

Commit

Permalink
fix: 🐛 修复 Input 绑定值无法为null的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
xuqingkai committed Jan 25, 2024
1 parent 5ba45b9 commit f745e14
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,9 @@ watch(
() => props.modelValue,
(newValue) => {
const { disabled, readonly, clearable } = props
if (newValue === null || newValue === undefined) {
if (newValue === undefined) {
newValue = ''
console.warn('[wot-design] warning(wd-input): value can not be null or undefined.')
console.warn('[wot-design] warning(wd-input): value can not be undefined.')
}
inputValue.value = newValue
showClear.value = Boolean(clearable && !disabled && !readonly && newValue)
Expand Down

0 comments on commit f745e14

Please sign in to comment.