mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
refactor: format InputItem type=number as number
This commit is contained in:
parent
8507e35ff2
commit
a12e168b45
1 changed files with 8 additions and 1 deletions
|
@ -31,7 +31,14 @@ defineEmits<{
|
||||||
|
|
||||||
const touch = inject(ValidationTouchSymbol)
|
const touch = inject(ValidationTouchSymbol)
|
||||||
|
|
||||||
const model = defineModel<string | number | null>()
|
const model = defineModel<string | number | null>({
|
||||||
|
set(value) {
|
||||||
|
if (props.type === 'number' && typeof value === 'string') {
|
||||||
|
return parseInt(value)
|
||||||
|
}
|
||||||
|
return value
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
const autocomplete = computed(() => {
|
const autocomplete = computed(() => {
|
||||||
const typeToAutocomplete = {
|
const typeToAutocomplete = {
|
||||||
|
|
Loading…
Reference in a new issue