Skip to content

Commit

Permalink
fix: 🐛 修复Input设置为number类型时绑定值重设为0时显示异常的问题
Browse files Browse the repository at this point in the history
Closes: #470
  • Loading branch information
Moonofweisheng committed Aug 1, 2024
1 parent f207876 commit df6a6a0
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,7 @@ watch(
watch(
() => props.modelValue,
(newValue) => {
if (newValue === undefined) {
newValue = ''
console.warn('[wot-design] warning(wd-input): value can not be undefined.')
}
inputValue.value = newValue
inputValue.value = isDef(newValue) ? String(newValue) : ''
},
{ immediate: true, deep: true }
)
Expand Down

0 comments on commit df6a6a0

Please sign in to comment.