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}});
});
如果答案解決了您的問題,請接受。否則讓我知道我可以如何幫助。謝謝。 –