‘xxxx‘ is declared but its value is never read.Vetur(6133)

问题

在打开vscode时,部分变量等报 is declared but its value is never read,尤其是vite+vue3+TypeScript
‘xxxx‘ is declared but its value is never read.Vetur(6133)_第1张图片

原因

vetur不再支持维护了
‘xxxx‘ is declared but its value is never read.Vetur(6133)_第2张图片

‘xxxx‘ is declared but its value is never read.Vetur(6133)_第3张图片

方案

1、卸载vetur
2、安装Vue Language Features (Volar)TypeScript Vue Plugin (Volar)
‘xxxx‘ is declared but its value is never read.Vetur(6133)_第4张图片

‘xxxx‘ is declared but its value is never read.Vetur(6133)_第5张图片

你可能感兴趣的:(vue,vue.js,javascript,ecmascript)