【发布时间】:2019-02-21 22:01:05
【问题描述】:
我用 npm 和 vuejs/vue-cli 创建了一个项目。 我的 package.json 文件中有 eslint 条目。
我在运行代码时收到警告:
警告编译时有 1 个警告
上午 5 点 57 分 37 秒✘http://eslint.org/docs/rules/space-before-function-paren失踪 函数括号前的空格 src/components/HomePage.vue:142:9 显示() { ^
✘ 1 个问题(1 个错误,0 个警告)
我应该如何处理这一行中的空格?
export default {
el: '#skills',
props: {
skill: Object,
selectedId: Number
},
computed: {
show() { //in this line
return this.skill.id === this.selectedId
}
},
...
}
【问题讨论】: