vue-styleguidist: How to document a Component inside "script setup" blocks?
Hi there!
How to document it? Slots, props and events are working fine. But how to set the basic Component description?
<script setup lang="ts">
/**
* This should show up somewhere.
*/
...
</script>
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (6 by maintainers)
Commits related to this issue
- feat: handle defineOptions in docgen api (#1576) closes #1575 closes #1399 — committed to vue-styleguidist/vue-styleguidist by elevatebart a year ago
I didn’t go too much further and just went with this in the configs. To also not need to do much processing, I went with this style of doc for the component:
Not included for now. For me it is sufficient the title derived from the filename. Anyway, I think to include a split of the string (text) on
@component
and then on@displayName
to extract the contents. Hope it helps.FYI for us, the
<docs>...</docs>
block worked fine with a vite plugin: