Collapse

Use Collapse para almacenar contenidos.

Uso básico

Puede expandir múltiples paneles

Consistent with real life: in line with the process and logic of real life, and comply with languages and habits that the users are used to;
Consistent within interface: all elements should be consistent, such as: design style, icons and texts, position of elements, etc.

Acordeón

En modo acordeón solo un panel puede ser expandido a la vez

Active el modo acordeón usado el atributo accordion.

Consistent with real life: in line with the process and logic of real life, and comply with languages and habits that the users are used to;
Consistent within interface: all elements should be consistent, such as: design style, icons and texts, position of elements, etc.

Título personalizado

Además de usar el atributo title, se puede personalizar el título del panel con slots con nombre, esto hace posible agregar contenido personalizado, por ejemplo: iconos.

TIP

Starting from version 2.9.10, the title slot provides an isActive property that indicates whether the current collapse item is active.

Custom icon 2.8.3

Besides using the icon attribute, you can customize icon of panel item with named slots, which makes adding custom content.

Consistent with real life: in line with the process and logic of real life, and comply with languages and habits that the users are used to;
Consistent within interface: all elements should be consistent, such as: design style, icons and texts, position of elements, etc.

Custom icon position 2.9.10

using the expand-icon-position attribute, you can customize icon position.

expand icon position:
left

Prevent collapsing 2.9.11

set the before-collapse property, If false is returned or a Promise is returned and then is rejected, will stop collapsing.

before collapse return:
true
Consistent with real life: in line with the process and logic of real life, and comply with languages and habits that the users are used to;
Consistent within interface: all elements should be consistent, such as: design style, icons and texts, position of elements, etc.

Collapse API

Collapse Attributes

NombreDescripciónTipoDefault
model-value / v-modelcurrently active panel, the type is string in accordion mode, otherwise it is arraystring / array[]
accordionsi desea activar el modo de acordeónbooleanfalse
expand-icon-position 2.9.10set expand icon positionenumright
before-collapse 2.9.11before-collapse hook before the collapse state changes. If false is returned or a Promise is returned and then is rejected, will stop collapsingFunction

Collapse Events

NombreDescripciónType
changetriggers when active panels change, the parameter type is string in accordion mode, otherwise it is arrayFunction

Collapse Slots

NombreDescripciónSubtags
defaultpersonaliza el contenido por defectoCollapse Item

Collapse Exposes

NombreDescripciónTipo
activeNamescurrently active panel namesobject
setActiveNamesset active panel namesFunction

Collapse Item API

Collapse Item Attributes

NombreDescripciónTypeDefault
nameidentificador único del panelstring / number
titletítulo del panelstring''
icon 2.8.3icon of the collapse itemstring / ComponentArrowRight
disableddeshabilita el collapse ítembooleanfalse

Collapse Item Slot

NameDescriptionType
defaultcontenido del Collapse Ítem
titlecontenido del Collapse Ítemobject
icon 2.8.3content of Collapse Item iconobject

Collapse Item Exposes

NameDescriptionType
isActivewhether the current collapse item is activeobject

Fuente

ComponentesStyleDocumentación

Contribuidores