0

移行ガイドを読み、Ext.extendを次のようなものに移行する方法を理解しました。

namespace.newClass = Ext.extend(Ext.Panel,overrides);

次のようなもの(私が一般的に行っており、一般的に見られるもの)をどのように移行しますか?

namespace.newClass = function(arguments){
Do some stuff;
};
Ext.extend(namespace.newClass,Ext.Panel,overrides);
4

1 に答える 1

3

このようなもの:

Ext.define('MyApp.foo.MyClass', {
    extend: 'MyApp.bar.OtherClass',

    constructor: function(){
        // Call parent ctor if required
        this.callParent(arguments);            
    },

    otherMethod: function() {

    }
});
于 2012-10-15T22:38:11.270 に答える