当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - How to make inheritance in w2ui?

问题描述:

I want to create a child of W2UI object.

function MyGrid(cfg) {

w2ui.w2grid.apply(this, arguments);

/* some my methods */

}

MyGrid.prototype = Object.create($().w2grid.prototype);

MyGrid .prototype.constructor = MyGrid ;

var test = new MyGrid ({conf:'someConf'}); // here I got TypeError: $(...)[0].style is undefined

How to do it right?

分享给朋友:
您可能感兴趣的文章:
随机阅读: