unplugin / unplugin-vue-components

📲 On-demand components auto importing for Vue

Home Page:https://www.npmjs.com/package/unplugin-vue-components

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vscode 编辑器属性没有提示

ajesses opened this issue · comments

image
当配置自动引入组件后,vscode 编辑器的属性提示没有
image
当手动引入组件后,使用 el-button 写法,属性也没有提示
image
使用 ElButton 写法,属性有提示,但是值没有提示

当使用自定义组件时,也是类似情况

有解决嘛?代码提示和类型校验都失效了

如果你使用 pnpm ,在没有任何.npmrc配置的的情况下,你将无法获得代码提示和类型校验,因为在顶层依赖中没有 @vue/runtime-core.
有两种解决方案:

  1. .npmrc 添加
shamefully-hoist=true  # or public-hoist-pattern[]=@vue*

运行 pnpm i

  1. 使用 0.18.5 版本

如果你使用 pnpm ,在没有任何.npmrc配置的的情况下,你将无法获得代码提示和类型校验,因为在顶层依赖中没有 @vue/runtime-core. 有两种解决方案:

  1. .npmrc 添加
shamefully-hoist=true  # or public-hoist-pattern[]=@vue*

运行 pnpm i

  1. 使用 0.18.5 版本

thx