大家好,我是学生和学习者,是Visual Studio代码的新手。我使用的是Java Scr ipt,每当我尝试通过按Ctrl + save按钮保存代码时,它都会自动缩进代码,这会在终端上显示问题,请您帮帮我! 这是我在按Ctrl + save之前写的:
return ( <
div className = "App" >
<h1> Hello World this is my world i am the master of this world you all are my slaves! </h1>
<FormControl >
<InputLabel > Email a message... </InputLabel>
<Input value = { input }
onChange = { event => setInput(event.target.value) }/>
<Button disabled = {!input }
color = "primary"
variant = "contained"
onClick = { sendMessage } > send </Button>
</FormControl>
{
message.map(message => (
<Message text={message}/>
))
}
</div>);
}
这里是按Ctrl + S后自动执行的操作:
return ( <
div className = "App" >
<
h1 > Hello World this is my world i am the master of this world you all are my slaves! < /h1> <
FormControl >
<
InputLabel > Email a message... < /InputLabel> <
Input value = { input }
onChange = { event => setInput(event.target.value) }
/> <
Button disabled = {!input }
color = "primary"
variant = "contained"
onClick = { sendMessage } > send < /Button> <
/FormControl>
{
message.map(message => ( <
Message text = { message }
/>
))
} <
/div>);
}
因此,我的终端出现问题:
{
"resource": "/c:/Users/DELL/Desktop/fbmsg/fbmsg/src/App.js",
"owner": "typescript",
"code": "1005",
"severity": 8,
"message": "'</' expected.",
"source": "ts",
"startLineNumber": 41,
"startColumn": 24,
"endLineNumber": 41,
"endColumn": 24
}