[英]I have an ESlint error in my Vue.js project, why can't I fix it
A few months ago I came across this error in my vue.js project line numbers 22, 23 and 24 relate to lines 45, 46 and 47 in my code block at the bottom几个月前,我在我的 vue.js 项目中遇到了这个错误,第 22、23 和 24 行与底部代码块中的第 45、46 和 47 行相关
{
"resource": "/C:/Users/Demo User/Documents/vue/mynewwebsite/src/App.vue",
"owner": "eslint",
"severity": 8,
"message": "Parsing error: Unexpected token, expected \",\"\n\n 22 | }\n 23 | }\n> 24 |\n | ^",
"source": "eslint",
"startLineNumber": 47,
"startColumn": 1,
"endLineNumber": 47,
"endColumn": 1
}
Since then I have tried to find solutions on SO and google and I asked a friend.从那以后,我试图在 SO 和 google 上找到解决方案,并问了一个朋友。 I thought it was just a comma in the wrong place and tried adding and removing commas in appropriate places but that didn't help (edit: I had missed a curly brace, duh)
我认为这只是一个错误位置的逗号,并尝试在适当的位置添加和删除逗号,但这没有帮助(编辑:我错过了一个大括号,废话)
Here is my code from the script tag in App.vue
这是我在
App.vue
的 script 标签中的App.vue
25 <script>
26 import Modal from './components/Modal.vue';
27 export default {
28 name: 'App',
29 components: { Modal, },
30 data() {
31 return {
32 title: 'my new website',
33 header: 'Modal Header',
34 text: 'modal content',
35 showModal: false,
36 showModalTwo: false
37 }
38 },
39 methods: {
40 toggleModal() {
41 this.showModal = !this.showModal;
42 },
43 toggleModalTwo() {
44 this.showModalTwo = !this.showModalTwo;
45 }
46 }
47 </script>
我在toggleModalTwo
缺少一个 '}'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.