为什么这里抛出了一个错误?我有点费解,求解答。?

Item.prototype.add = function ( child ) { // 在子元素容器中插入子元素 this.c<爱尬聊_知识大全>hildren.push ( child ); // 插入到当前组件元素树上 this.element.appendChild( child.getElement() ); return this; }; Item.prototype.getElement = function () { return this.element; };

Uncaught TypeError: child.getElement is not a function
这是怎么回事呢?


编辑 举报 2023-06-20 14:43

0个评论

暂无评论...
验证码 换一张
相关内容