FlatCollapse.vue 464 B

12345678910111213141516171819202122232425
  1. <template>
  2. <a-collapse v-model:activeKey="activeKey" ghost class="flat-collapse" >
  3. <a-collapse-panel key="1" :header="label">
  4. <slot />
  5. </a-collapse-panel>
  6. </a-collapse>
  7. </template>
  8. <script setup lang="ts">
  9. import { ref } from 'vue';
  10. const activeKey = ref(['']);
  11. const props = defineProps<{
  12. label: string;
  13. }>();
  14. </script>
  15. <style lang="scss" scoped>
  16. .flat-collapse {
  17. ::v-deep .ant-collapse-header {
  18. padding: 0 !important;
  19. }
  20. }
  21. </style>