关于visual-studio:VScode编辑中关于突然出现vue组件定义位置的白色嵌入提示信息及消除办法

Describe the bug

在应用vscode编辑器学习vue过程中,忽然发现vue组件定义的区域呈现红色的提示信息,影响代码编写。

To Reproduce

Steps to reproduce the behavior:

  1. Go to ‘…’
  2. Click on ‘….’
  3. Scroll down to ‘….’
  4. See error

Expected behavior

心愿不显示这个信息

Screenshots

Environment / Version (please complete the following information):

  • OS : windows10
  • git : git version 2.30.0.windows.2
  • node: v18.15.0
  • npm: 9.5.0

Solution

通过鼠标移入到该 提示信息上方,借助 VScode 的语法提醒性能,找到了暗藏的办法

  1. 设置 ➞ 输出 vue.inlay
  2. 在筛选出的后果中,勾销勾选 Vue > Inlay Hints : Options Wrapper选项。

Additional context

之前还好好的,忽然变成这样,也未曾更新 VScode ,所以不是版本更新的问题。

Reference

Similar questions

Further reading

  • https://vuejs.org/guide/typescript/overview.html#definecomponent

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理