fix(v-model): fix case where .trim and .number modifiers are used together (#5842)

fix #5839
This commit is contained in:
小刘(liulinboyi)
2022-05-13 07:52:16 +08:00
committed by GitHub
parent a3881299e9
commit 71066b5afe
4 changed files with 60 additions and 3 deletions

View File

@@ -122,7 +122,8 @@ export function emit(
const { number, trim } = props[modifiersKey] || EMPTY_OBJ
if (trim) {
args = rawArgs.map(a => a.trim())
} else if (number) {
}
if (number) {
args = rawArgs.map(toNumber)
}
}