You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ant-design-vue/components/collapse/demo/accordion.vue

37 lines
885 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<docs>
---
order: 1
title:
zh-CN: 手风琴
en-US: Accordion
---
## zh-CN
手风琴每次只打开一个 tab
## en-US
In accordion mode, only one panel can be expanded at a time.
</docs>
<template>
<a-collapse v-model:activeKey="activeKey" accordion>
<a-collapse-panel key="1" header="This is panel header 1">
<p>{{ text }}</p>
</a-collapse-panel>
<a-collapse-panel key="2" header="This is panel header 2">
<p>{{ text }}</p>
</a-collapse-panel>
<a-collapse-panel key="3" header="This is panel header 3">
<p>{{ text }}</p>
</a-collapse-panel>
</a-collapse>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
const activeKey = ref([]);
const text = `A dog is a type of domesticated animal.Known for its loyalty and faithfulness,it can be found as a welcome guest in many households across the world.`;
</script>