我正在学习React,我观察到一些人在JSX格式下使组件标签的颜色与普通HTML标签不同。然而,我真的找不到这样做的扩展(尝试过更漂亮的和React片段等)。我想知道是什么使这种行为成为可能?
的数据
guykilcj1#
在“settings.json”中:
"textMateRules": [ { "name": "component tags", "scope": [ "entity.name.tag", // HTML tags "support.class.component", // JSX/TSX Component tags ], "settings": { "foreground": "red", } }
"textMateRules": [
{
"name": "component tags",
"scope": [
"entity.name.tag", // HTML tags
"support.class.component", // JSX/TSX Component tags
],
"settings": {
"foreground": "red",
}
字符串
nhjlsmyf2#
原来这是一个内置的Visual Studio Dark+默认的深色主题。颜色的标签名称由亚历克斯提出也工作,只是不同的颜色。
falq053o3#
移除Babel扩展为我修复了它。
fcy6dtqo4#
添加Babel JavaScript扩展
4条答案
按热度按时间guykilcj1#
在“settings.json”中:
字符串
nhjlsmyf2#
原来这是一个内置的Visual Studio Dark+默认的深色主题。颜色的标签名称由亚历克斯提出也工作,只是不同的颜色。
falq053o3#
移除Babel扩展为我修复了它。
fcy6dtqo4#
添加Babel JavaScript扩展