使用Ext.js或煎茶,是什麼做的一點如下:Ext.apply與簡單設置目標值有什麼不同?
Ext.apply(app.views, {
contactsList: new app.views.ContactsList(),
contactDetail: new app.views.ContactDetail(),
contactForm: new app.views.ContactForm()
});
與此相對標準的JavaScript:
app.views.contactsList = new app.views.ContactsList();
app.views.contactDetail = new app.views.ContactDetail();
app.views.contactForm = new app.views.ContactForm();
有什麼區別?