Item.prototype.add = function ( child ) { // 在子元素容器中插入子元素
this.children.push ( child ); // 插入到當前組件元素樹上
this.element.appendChild( child.getElement() ); return this;
};
Item.prototype.getElement = function () { return this.element;
};Uncaught TypeError: child.getElement is not a function這是怎么回事呢?
為什么這里拋出了一個錯誤?我有點費解,求解答。
慕田峪7331174
2018-09-03 13:29:09