Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0.21之后的版本,所有组件的props, event等组件信息均没有智能提示信息 #4846

Open
LeetProgram opened this issue Sep 11, 2024 · 8 comments

Comments

@LeetProgram
Copy link

Vue - Official extension or vue-tsc version

2.1.6

VSCode version

1.93.0

Vue version

3.4.21

TypeScript version

5.2.2

System Info

No response

package.json dependencies

No response

Steps to reproduce

  1. 自定义了一个组件,在使用组件的属性或者自定义事件时,没有任何智能提示,引用的第三方库的组件也丢失了组件类型提示。
  2. 尝试切换了vscode版本,发现不是版本问题。
  3. 尝试切换typescript版本,也没有达到期望的效果。
  4. 将Vue-Officicl版本降级到v2.0.21发现已经可以智能提示,随后又尝试了2.0.21之后的版本,发现都没有提示。

What is expected?

能正常对自定义组件进行智能提示

What is actually happening?

自定义了一个组件,在使用组件的属性或者自定义事件时,没有任何智能提示,引用的第三方库的组件也丢失了组件类型提示

Link to minimal reproduction

No response

Any additional comments?

No response

@KazariEX
Copy link
Collaborator

你可以使用最新的 vue(3.5.4) 和 typescript(5.6.2) 再试试吗?如果不行的话尝试制作一个最小复现。

@Leepulse0
Copy link

Leepulse0 commented Sep 12, 2024

你的从2.0.21开始,我的从2.0.17开始,有的甚至连所有的组件都没有提示,vue版本3.4.38,typescript版本5.5.4

@Leepulse0
Copy link

唯独2.0.16这个版本才让我的项目全部类型提示正常

@RayGuo-ergou
Copy link
Contributor

Please check the tsserver(typescript plugin)'s typescript version, it might use the workspace version which is outdated.

@Leepulse0
Copy link

你好,我本地全局安装的typescript版本是5.6.2,项目中的typescript版本是5.5.4,项目中的vue-tsc版本是2.0.29,项目中也没有配置工作区的配置文件(vscode.config.js)

@RayGuo-ergou
Copy link
Contributor

Still worth to check the version that used by typescript server tho, e.g. maybe both npm and pnpm have installed typescript globally but npm one is outdated and used by the server.

If still having issue, create a minimal reproduction is recommended.

@Leepulse0
Copy link

npm one是什么?

@liangyao375
Copy link

使用2.0.16版本一切正常

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants