devtools-next icon indicating copy to clipboard operation
devtools-next copied to clipboard

why no setup 7.6.4

Open yangnuowei88 opened this issue 1 year ago • 6 comments

1731492951785

yangnuowei88 avatar Nov 13 '24 10:11 yangnuowei88

采用setup 语法糖,但是不显示setup 里面的内容,为什么?

yangnuowei88 avatar Nov 13 '24 10:11 yangnuowei88

I have seen this issue for a long time now. Some components have setup state and some don't. Simple reproduction is with vuejs.org's own playground. Just go to playground; the initial example demonstrates this well. There is no setup state for REPL:

Image

But there is setup state for the header:

Image

emahuni avatar Feb 04 '25 16:02 emahuni

I am having the same issue in 7.7.0. Has anyone else found a fix?

kadebedis avatar Feb 16 '25 19:02 kadebedis

When i debug my project with Element Plus, i can show some examples with this question. When you want to debug a component, you will find When the component is written with defineComponent, you can see the details of the data in the setup in devtools, such as the ElTable component:

Image However, when a component uses the < script setup > tag, the details of the data in the setup cannot be seen in devtools, such as the ElCheckbox component:

Image

I asked this question in stackoverflow) and get no help yet.

hellomrbigshot avatar Mar 18 '25 03:03 hellomrbigshot

Got similar question. In my case im building single component as a library (vite build.lib). Found some workaround: NODE_ENV=development vite build that allows to see setup info in devtools

bilanin avatar May 07 '25 17:05 bilanin

And more correct way, at least in my case, is this (@vitejs/plugin-vue):

vue({
      features: {
        prodDevtools: true,
      }
    }),

bilanin avatar May 07 '25 18:05 bilanin