fix(Input/Textarea): add v-model modifiers (#856)

This commit is contained in:
max
2023-11-10 11:05:58 +01:00
committed by GitHub
parent 6f0bfb5d89
commit 68f6956d6e
3 changed files with 89 additions and 6 deletions

View File

@@ -56,4 +56,13 @@ export function getSlotsChildren (slots: any) {
return children
}
/**
* "123-foo" will be parsed to 123
* This is used for the .number modifier in v-model
*/
export function looseToNumber (val: any): any {
const n = parseFloat(val)
return isNaN(n) ? val : n
}
export * from './lodash'