why no setup 7.6.4
采用setup 语法糖,但是不显示setup 里面的内容,为什么?
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:
But there is setup state for the header:
I am having the same issue in 7.7.0. Has anyone else found a fix?
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:
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:
I asked this question in stackoverflow) and get no help yet.
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
And more correct way, at least in my case, is this (@vitejs/plugin-vue):
vue({
features: {
prodDevtools: true,
}
}),