mirror of
https://git.hmsn.ink/kospo/svcm/oa.git
synced 2026-03-20 07:23:50 +09:00
41 lines
909 B
Markdown
41 lines
909 B
Markdown
### VAccordion
|
|
|
|
Vuero provides 2 accordion components with enough styling to be able to use
|
|
them out of the box: `<VAccordion />` and `<VCollapse />`.
|
|
In the simple accordion, each item can be openened separately, whereas in the
|
|
exclusive accordion, only one item can be expanded at a time.
|
|
Pass an **Array** to the `items` props to render the accordion.
|
|
|
|
<!--code-->
|
|
|
|
```vue
|
|
<script setup lang="ts">
|
|
const data = [
|
|
{
|
|
title: 'Accordion Item 1',
|
|
content: 'Sed ut perspiciatis unde omnis iste ...',
|
|
},
|
|
{
|
|
title: 'Accordion Item 2',
|
|
content: 'Sed ut perspiciatis unde omnis iste ...',
|
|
},
|
|
{
|
|
title: 'Accordion Item 3',
|
|
content: 'Sed ut perspiciatis unde omnis iste ...',
|
|
},
|
|
]
|
|
</script>
|
|
|
|
<template>
|
|
<div class="column is-6">
|
|
<VAccordion :items="data" />
|
|
</div>
|
|
|
|
<div class="column is-6">
|
|
<VAccordion :items="data" exclusive />
|
|
</div>
|
|
</template>
|
|
```
|
|
|
|
<!--/code-->
|