在PyCharm中为React道具禁用自动{}插入

val*_*tev 5 javascript jsx pycharm webstorm reactjs

当我在PyCharm的React组件中输入props时,它会自动插入一对花括号。像这样(光标位置为|):

<MyComp className=|
Run Code Online (Sandbox Code Playgroud)

成为:

<MyComp className={|}
Run Code Online (Sandbox Code Playgroud)

我已经搜索了设置,但是没有找到相关的设置来禁用它。是否存在?

Nik*_*sky 5

您可以禁用括号通过关闭自动插入 "Add quotes for attribute value on typing '=' and attribute completion"Settings -> Editor -> General -> Smart Keys

但这将禁用自动插入HTML引号的功能。