【发布时间】:2018-05-25 16:49:35
【问题描述】:
我安装了这个插件:https://github.com/HookyQR/VSCodeBeautify
这是我的代码
import React, { Component } from 'react';
export default class TempInput extends Component {
render() {
return (
<div>
<input
value={temperature}
onChange={this.handleChange} />
</div>
);
}
}
点击 Ctrl+Shift+I 后,首先我收到消息
无法确定美化类型请选择。
然后它允许我从 HTML、JS、CSS 中进行选择。当我选择 JS 时,这是我得到的结果:
import React, {
Component
} from 'react';
export default class TempInput extends Component {
render() {
return ( <
div >
<
input value = {
temperature
}
onChange = {
this.handleChange
}
/>
<
/div>
);
}
}
知道为什么吗? 语言模式在 VScode 中设置为 JS/React。
如果我卸载该插件并单击 Ctrl+Shift+I,我会收到此错误
找不到命令“HookyQR.beautifyFile”
【问题讨论】:
标签: javascript reactjs visual-studio-code