‘x‘ is assigned a value but never used no-unused-vars

报错:

97:21  error  'count' is assigned a value but never used  no-unused-vars

✖ 1 problem (1 error, 0 warnings)

发生原因:

发生这种情况是因为eslint的验证语法,您正在定义x但未使用它。

解决方法如下:

  1. 只需将其删除
  2. 在错误代码后加入该行注释就行:
// eslint-disable-line no-unused-vars

修改后为:

let count = 10000 // eslint-disable-line no-unused-vars
this.$nextTick(function() {
      console.log('DOM 更新了 ' )
})                
上一篇:vue 踩坑 -- 'qrcode' is assigned a value but never used no-unused-vars


下一篇:LDAP3