<p id="apps">
<img src="./assets/logo.png">
<p v-bind:title='message'>
{{message}}
</p>
</p>
<script>
var apps = new Vue({
el: '#apps',
data: {
message: 'Hello Vue!'
}
})
</script>
报的错如下:
✘ http://eslint.org/docs/rules/no-mixed-spaces-and-tabs Mixed spaces and tabs
/Users/derek/Documents/myProject/vue/firstVue/src/App.vue:13:2
message: 'Hello Vue!'
^
✘ http://eslint.org/docs/rules/no-tabs Unexpected tab character
/Users/derek/Documents/myProject/vue/firstVue/src/App.vue:14:2
}
^
✘ http://eslint.org/docs/rules/no-mixed-spaces-and-tabs Mixed spaces and tabs
/Users/derek/Documents/myProject/vue/firstVue/src/App.vue:14:2
}
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 0 spaces but found 1 tab
/Users/derek/Documents/myProject/vue/firstVue/src/App.vue:15:2
})
^
✘ http://eslint.org/docs/rules/no-tabs Unexpected tab character
/Users/derek/Documents/myProject/vue/firstVue/src/App.vue:15:2
})
^
✘ 13 problems (13 errors, 0 warnings)
Errors:
6 http://eslint.org/docs/rules/no-tabs
4 http://eslint.org/docs/rules/no-mixed-spaces-and-tabs
2 http://eslint.org/docs/rules/indent
1 http://eslint.org/docs/rules/no-unused-vars
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
缩进是四个空格而不是tab键
初学者建议先不用
eslint,熟悉一点了再用,不然代码全都过不了这些都是EsLint报错,你根基提示翻译一下,对应处理就可以了。
eslint的错误解决方法可以参考它给出的链接
楼上说的对,刚开始我也是被坑了,建议初学者不要使用eslint,熟悉了再用