We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9e8ac0c commit fa8f257Copy full SHA for fa8f257
packages/runtime-dom/src/directives/vModel.ts
@@ -86,9 +86,10 @@ export const vModelText: ModelDirective<
86
el[assignKey] = getModelAssigner(vnode)
87
// avoid clearing unresolved text. #2302
88
if ((el as any).composing) return
89
-
90
const elValue =
91
- number || el.type === 'number' ? looseToNumber(el.value) : el.value
+ number || (el.type === 'number' && el.value[0] !== '0')
+ ? looseToNumber(el.value)
92
+ : el.value
93
const newValue = value == null ? '' : value
94
95
if (elValue === newValue) {
0 commit comments