vuese / vuese

🤗 One-stop solution for vue component documentation. Original org: https://github.com/vuese
https://vuese.github.io/website/
MIT License
1.69k stars 120 forks source link

Props not read when using defineComponent #264

Open EdieLemoine opened 1 year ago

EdieLemoine commented 1 year ago

Describe the bug When I use defineComponent, Vuese does not extract props.

To Reproduce You can see it in the sandbox: https://vuese.github.io/vuese-explorer/

First, try it without defineComponent:

<template>
    <div />
</template>

<script>
export default {
  name: 'MyComponent',
  props: {
    // Loading
    loading: {
      type: Boolean,
    },
  },
};
</script>

This will output a props section with the loading prop, its type and the comment above it.

Then with:

<template>
    <div />
</template>

<script>
import {defineComponent} from 'vue';

export default defineComponent({
  name: 'MyComponent',
  props: {
    // Loading
    loading: {
      type: Boolean,
    },
  },
});
</script>

This will output nothing.

Expected behavior Props to show up in the example where I use defineComponent, just as they do in the one without it.

TheCelebrimbor commented 1 year ago

Facing this issue as well, any resolutions ?