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

2次阅读

共计 577 个字符,预计需要花费 2 分钟才能阅读完成。

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
正文完
 0