webstom cannot find vue global component

I'm so convinced that automatic component registration has been introduced

   // 自动引入组建
   import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'

    Components({
        directoryAsNamespace: true,
        resolvers: [ElementPlusResolver()]
    }),

components.d.ts was generated but I defined the tags in webstom

Insert image description here

Unless you import it automatically, you won't be able to get in. This is not the point. The point is that I also introduced vue to automatically import components.

  // 自动倒入原始组建
    AutoImport({
        imports: ['vue', 'vue-router'],
        resolvers: [ElementPlusResolver()],
        eslintrc: {
            enabled: false
        }
    }),

If there is a problem with the introduction of the above components, it is strange that the automatic introduction of vue can

Insert image description here

Insert image description here

This is very poisonous

I tried compiling without adding components, and I also introduced these two generated automatic import files into the compiler.

So I think this is the case. Vue files can be imported because in the script tag, the same automatically imported components should also come in. Otherwise, the project will report an error, but the project does not, so it must be a problem with webstom, so I went Go to the directory and link it

Insert image description here

To attach this file, HTML is configured by syntax control
Insert image description here
, but this can only be customized tags. It is impossible to configure them one by one. It must be retained in the node-model in vue, so I gave up. I think it will be fine as long as it is introduced. , Baidu for three hours. No results were found, but there is a VS solution, but I prefer to use webstom, maybe because I use idea to write the backend.

Let’s get straight to the point. Since it’s a problem with webstom, I think I should go to the official website to have a look. Then I searched for more than an hour and saw this.

Insert image description here
Link

I took a look and my version is 2021, so don’t do it and give up.

In fact, the global component cannot be loaded, which seems to be the end of the world.

Download https://www.jetbrains.com/zh-cn/webstorm/download/other.html 2022.1

Overwrite previous version

Insert image description here
Insert image description here
Perfect

Guess you like

Origin blog.csdn.net/weixin_44550490/article/details/129146529