mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-20 06:51:46 +01:00
docs: fix input with objects and arrays
This commit is contained in:
@@ -49,7 +49,7 @@
|
||||
size="sm"
|
||||
/>
|
||||
<UInput
|
||||
v-else-if="prop.type === 'String'"
|
||||
v-else-if="prop.type === 'String' && typeof prop.value === 'string'"
|
||||
v-model="prop.value"
|
||||
:name="prop.key"
|
||||
size="sm"
|
||||
@@ -64,11 +64,12 @@
|
||||
/>
|
||||
<UTextarea
|
||||
v-else
|
||||
v-model="prop.value"
|
||||
:model-value="prop.value && JSON.stringify(prop.value)"
|
||||
:name="prop.key"
|
||||
size="sm"
|
||||
:rows="8"
|
||||
autoresize
|
||||
@update:model-value="value => prop.value = JSON.parse(value)"
|
||||
/>
|
||||
</UFormGroup>
|
||||
</div>
|
||||
@@ -189,10 +190,6 @@ const defaultProps = {
|
||||
icon: 'heroicons-outline:external-link',
|
||||
to: 'https://google.fr',
|
||||
target: '_blank'
|
||||
},
|
||||
{
|
||||
label: 'Logout',
|
||||
avatar: 'https://github.com/benjamincanac.png'
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user