IDE的一个最着名的特性就是你知道找到项目中变量,函数或类的引用(或用法)。我一直在尝试Atom Atom)一段时间。我喜欢它,到目前为止。但是,我找不到一种方法来访问var/function或JavaScript代码中的类的引用(或用法)。 Atom编辑器中没有此功能吗?下面给出两个例子。如何在Atom编辑器中查找引用(或用法)?
a)在下面的简单代码中,Atom不接受我的“标题”声明。通过右键单击“标题”来制作“去宣言”
Template.docAddForm.events({
'submit .js-add-doc':function(event){
const title = event.target.doctitle.value; // The declaration of "title"
Session.set('docTitle', title); // Cannot access the declaration of "title" in Atom
}
});
另一个例子。我无法访问用户对象,这是在以下代码中在导入的“commons.js”中声明的集合。
import { Meteor } from 'meteor/meteor';
import {Users} from '../lib/commons.js';
/** PUBLICATIONS **/
Meteor.publish('users', function() {
return Users.find({}, {fields: {_id: 0}});
});
如果答案解决了您的问题,请接受。否则让我知道我可以如何帮助。谢谢。 –