An error is reported when running the Vue projecterror 'scope' is defined but never used vue/no-unused-vars
The error is caused here
<template slot="header" slot-scope="scope">
<el-input v-model="search" placeholder="请输入关键字搜索"/>
</template>
method one
Modify the package.json
file in WebStorm and modify rules
it as follows:
"rules": {
"no-console": "off",
"no-unused-vars":"off",
"no-debugger": "off"
}
Run again, sometimes there is, sometimes not. It's a headache!
Method Two
According to the very effective method found on the official GitHub issue, change it to the following:
<template slot="header" slot-scope="{}">
<el-input v-model="search" placeholder="请输入关键字搜索"/>
</template>
Run, no more errors!