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

VS Code 插件,当为组件新增 props 后,当去使用时需要尝试很多次才会提示这个属性 #5125

Open
WangJincheng4869 opened this issue Jan 14, 2025 · 0 comments

Comments

@WangJincheng4869
Copy link

WangJincheng4869 commented Jan 14, 2025

Vue - Official extension or vue-tsc version

2.2.0

VSCode version

1.96.3

Vue version

3.5.13

TypeScript version

5.7.3

System Info

System:
    OS: Windows 10 10.0.26100
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
    Memory: 5.05 GB / 31.56 GB
  Binaries:
    Node: 22.11.0 - D:\Program Files\nodejs\node.EXE
    Yarn: 1.22.21 - D:\Users\jcwang\AppData\Roaming\npm\yarn.CMD
    npm: 10.4.0 - D:\Users\jcwang\AppData\Roaming\npm\npm.CMD
  Browsers:
    Edge: Chromium (127.0.2651.86)
    Internet Explorer: 11.0.26100.1882

package.json dependencies

No response

Steps to reproduce

我目前遇见的情况:

  1. 在本已经存在的组件上新增一个 props(原本也存在属性),并使用解构语法设置默认值
  2. 在之前使用到这个组件的地方去使用这个新增的 props
  3. 尝试激活提示,但并没有出现新的属性
  4. 但是,当我手动输入这个属性后,是可以显示注释新的的,说明插件应该是可以读取到这个属性,但是在提示列表中没有

QQ截图20250114103118

What is expected?

可以提示这个属性

What is actually happening?

在提示列表中没有新的的这个属性,需要尝试很多次才有概率出现。我发现随着项目规模的增大,出现类似的情况也开始增多,之前并没有发现此问题。

Link to minimal reproduction

No response

Any additional comments?

No response

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

1 participant