1
extjs使用间接类定义系统。这里是脚本# - 需要包装extjs函数的建议definiton
Ext.define('User', {
extend: 'Ext.data.Model',
fields: [
{name: 'name', type: 'string'},
{name: 'age', type: 'int'},
{name: 'phone', type: 'string'},
{name: 'alive', type: 'boolean', defaultValue: true}
],
changeName: function() {
var oldName = this.get('name'),
newName = oldName + " The Barbarian";
this.set('name', newName);
}
});
我试图找出如何以s#这个包裹起来的例子。这里是我tryiung确切的东西来包装
Ext.define('jslate.data.Proxy', {
extend: 'Ext.data.proxy.Client',
constructor: function (config) {
this.callParent([config]);
//ensures that the reader has been instantiated properly
this.setReader(this.reader);
this.dataManager = config.dataManager;
},
read: function (operation, callback, scope) {
var me = this;
me.dataManager.read(operation, callback, scope);
},
clear: Ext.emptyFn
});
我看不出如何做到这一点 - 有什么建议?例如,我需要一个任意大小的函数名称和定义数组,每个函数都有任意数量的参数。如果我在那里得到'这个'。
优秀的答案 - tx。我们是否可以通过电子邮件聊天以跟进第二种方法(它与我正在尝试做的事情相匹配)[email protected] – pm100