【发布时间】:2019-10-31 16:05:55
【问题描述】:
我有一个设置样式文件,例如:
GlobalStyles.js
export const GlobalStyles={
ViewContainer:{flex:1, justifyContent:'center', alignItems:'center'},
Center:{justifyContent:'center', alignItems:'center'},
FontNormal:15,
FontMedium:18,
FontLarge:28,
FontHeader:38
}
module.export={GlobalStyles}
当我在另一个 JS 文件中使用它时,比如说Home.js。我想知道我定义的每个Key:Value,
GlobalStyles.js vscode 中的那些导出建议像这样的导入样式:
import { GlobalStyles } from '../Component/GlobalStyles';
我的预期结果是这样的:
import { ViewContainer, Center, FontMedium, [and so on]} from '../Component/GlobalStyles';
当我输入 foo 时,如何让 vscode 建议我Auto Import foo from path/to/GlobalStyles?其中foo 类似于ViewContainer, Center, FontMedium, [and so on]。
【问题讨论】:
-
有什么对象与您输入的关键字
foo匹配? -
@ifconfig all key:value 在 GlobalStyles 中,如 Center、FontMedium 等
标签: reactjs visual-studio-code intellisense