Vue运行时出现如下问题
WARNING Compiled with 1 warnings 8:05:11 ├F10: AM┤
✘ https://google.com/#q=vue%2Frequire-v-for-key Elements in iteration expect to have 'v-bind:key' directives
src\components\SayHi.vue:11:9
<li v-for="tech in technologies">
^
✘ http://eslint.org/docs/rules/no-multiple-empty-lines More than 1 blank line not allowed
src\components\SayHi.vue:29:1
^
✘ http://eslint.org/docs/rules/padded-blocks Block must not be padded by blank lines
src\components\SayHi.vue:31:3
},
^
✘ http://eslint.org/docs/rules/space-before-function-paren Missing space before function parentheses
src\components\SayHi.vue:37:21
say_hi: function(name) {
^
✘ http://eslint.org/docs/rules/semi Extra semicolon
src\components\SayHi.vue:38:26
alert('hi:' + name);
^
✘ 5 problems (5 errors, 0 warnings)
Errors:
1 https://google.com/#q=vue%2Frequire-v-for-key
1 http://eslint.org/docs/rules/no-multiple-empty-lines
1 http://eslint.org/docs/rules/padded-blocks
1 http://eslint.org/docs/rules/space-before-function-paren
1 http://eslint.org/docs/rules/semi
You may use special comments to disable some warnings.
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable */ to ignore all warnings in a file.
这是因为Eslint语法太严格导致的。
解决方案
在index.js中把useEslint改为false。