这个问题就是ES检查报错, 排查逻辑如下
You may use special comments to disable some warnings.
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable */ to ignore all warnings in a file.
ERROR in
/Users/mac/WebstormProjects/vue3/src/components/HelloWorld.vue
38:36 error 'oldvalue' is defined but never used no-unused-vars
✖ 1 problem (1 error, 0 warnings)
webpack compiled with 1 error
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable */ to ignore all warnings in a file.
大致意思就 选择一种方式来忽略处理
查看配置 vue.config
关闭es 检查 lintOnSave:false

const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true,
lintOnSave:false,
})
本文档描述了在Vue3项目中遇到的ESLint检查错误,提示未使用变量'oldvalue'。提供了通过添加特殊注释忽略警告的解决方法,如使用//eslint-disable-next-line或/*eslint-disable*/。同时展示了在vue.config.js中关闭ESLint保存时检查的配置,将lintOnSave设置为false。
4312

被折叠的 条评论
为什么被折叠?



