Why does vue still report jsx errors? Although an error is reported, it can be executed normally. What is the reason?

235 views Asked by At

Why does vue still report jsx errors? Although an error is reported, it can be executed normally. What is the reason?

<el-submenu index="1">
< const ElMenuItem: unknown
    JSx element type 'E1MenuItem' does not have any construct signature or call signature. ts (2604)>
< View issues No quick fixes available>
< el-menu-item index="1-1">item1</el-menu-item>
< el-menu-item index="1-2">item1</el-menu-item>
</el-submenu>
1

There are 1 answers

0
Kan Robert On

It should be a problem with the volar plugin. Try to upgrade the version of the plugin to 0.36.1, or you can add some configuration and add such a configuration to tsconfig.json.

{
  "vueCompilerOptions": {
    "experimentalSuppressInvalidJsxElementTypeErrors": true
  }
}