Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/svn/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Intellij idea IntelliJ IDEA:在javascript中提取常量_Intellij Idea_Constants - Fatal编程技术网

Intellij idea IntelliJ IDEA:在javascript中提取常量

Intellij idea IntelliJ IDEA:在javascript中提取常量,intellij-idea,constants,Intellij Idea,Constants,我使用Ctrl-Alt C在Java中提取常量,但对于Javascript,尤其是React/ES6,我在IntellJ中找不到提取常量的选项。还检查了上下文菜单,但它不在那里 我需要更改中本地显示的“更改高度” return (dispatch) => { dispatch({ type: "CHANGE_HEIGHT", height: height }); } 到 所以我可以在减速器中使用它 我现在手工做这个,但是如果我们可以用Ctrl-Alt C提取它就好了。

我使用Ctrl-Alt C在Java中提取常量,但对于Javascript,尤其是React/ES6,我在IntellJ中找不到提取常量的选项。还检查了上下文菜单,但它不在那里

我需要更改中本地显示的
“更改高度”

return (dispatch) => {
    dispatch({ type: "CHANGE_HEIGHT",
      height: height });
}

所以我可以在减速器中使用它

我现在手工做这个,但是如果我们可以用Ctrl-Alt C提取它就好了。为什么它不在那里我该怎么做?

没有这样的功能:(请关注更新)

现在我建议使用提取字段提取变量重构

export const CHANGE_HEIGHT = 'CHANGE_HEIGHT';