mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-21 15:31:46 +01:00
fix(Input/Textarea): add v-model modifiers (#856)
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user