gpt4 book ai didi

vuejs3 - 使用 <script setup/> eslint 和 vetur 警告,即使我在模板中使用它们也是如此

转载 作者:行者123 更新时间:2023-12-02 16:10:51 24 4
gpt4 key购买 nike

我正在使用 <script setup>在 vue 3 中,但我在我的方法中收到了这些警告,因为我不再需要返回它们。

知道为什么它会给我这些警告吗? enter image description here

enter image description here

最佳答案

这是 4 个月后的事,但它可能会帮助遇到同样问题的其他人。

你没有包括警告实际上是什么,但我相信它们与未使用的变量和函数有关(因为变灰标识符是 VS Code 将其标记为未使用的方式,而且因为我自己也遇到过同样的问题) .

这是由于 Vetur not supporting <script setup> yet .

Volar现在是 Vue 的推荐 VS Code 扩展(参见 this comment of Evan'sthe docs )。 Vetur 现已弃用,will enter "End of Life by the end of 2023" .

关于vuejs3 - 使用 &lt;script setup/> eslint 和 vetur 警告,即使我在模板中使用它们也是如此,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68063630/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com