switch (val) { case '1': this.morse = true this.crcuit = true break case '2': this.morse = true this.crcuit = true this.highest = true break case '3': this.highest = true this.necessary = true break case '4': this.peak = true this.morse = true break case
时间: 2024-03-17 18:40:07 浏览: 84
缺少switch语句的结尾大括号。应该在代码最后加上一个大括号" } "来结束switch语句。同时,每一个case语句应该以冒号":"结尾。修改后的代码如下:
```
switch (val) {
case '1':
this.morse = true;
this.crcuit = true;
break;
case '2':
this.morse = true;
this.crcuit = true;
this.highest = true;
break;
case '3':
this.highest = true;
this.necessary = true;
break;
case '4':
this.peak = true;
this.morse = true;
break;
}
```
阅读全文