我一直试图弄清楚如何console.log('whatever')在我的方法中学习一些 VueJs 开发,以了解我在这里所做的任何事情的一些行为。
我知道这里已经提出了一些问题,并且已经将范围纳入ESLINT文档以尝试解决这个问题......我实际上无法理解我应该做什么。
我的代码:
methods: {
submitData() {
this.$http.post('https://vue-testing-8a2de.firebaseio.com/data.json', this.user)
.then(response => {
console.log(response);
}, error => {
console.log(error)
})
}
}
Run Code Online (Sandbox Code Playgroud)
这是 ESLINT 上的错误:
Failed to compile.
./src/App.vue
Module Error (from ./node_modules/eslint-loader/index.js):
error: Unexpected console statement (no-console) at src/App.vue:35:22:
33 | this.$http.post('https://vue-testing-8a2de.firebaseio.com/data.json',this.user)
34 | .then(response => {
> 35 | console.log(response);
| ^
36 | }, error => {
37 | console.log(error)
38 | })
error: Unexpected console statement (no-console) at src/App.vue:37:22:
35 | …Run Code Online (Sandbox Code Playgroud)