我的代码中有一行:
this.someVar = document.querySelectorAll("div[container-type='some-container']")[0];
Run Code Online (Sandbox Code Playgroud)
ESLint检查为此行“使用数组解构”抛出错误。如何解决此错误。
尝试这个
([this.someVar] = document.querySelectorAll("div[container-type='some-container']"));
Run Code Online (Sandbox Code Playgroud)