这个语句显示有语法错误应该怎么修改?求解答!

showInfoBtn(){
return
(this.personAuth==='specialist'
||this.personAuth==='dispatcher'
||this.personAuth==='doctor')
},
这个语句显示有语法错误应该怎么修改?
白板的微信
浏览 324回答 2
2回答

宝慕林4294392

showInfoBtn(){return(this.personAuth==='specialist'||this.personAuth==='dispatcher'||this.personAuth==='doctor')},改成这样即可

慕森卡

不截图,看不出来语法错误哎。这种判断不嫌麻烦吗?return['speciallist','dispatcher','doctor'].includes(this.personAuth)
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript