2.9.1
Google Chrome 75.0.3770.80
2.6.10
https://codepen.io/pen/?&editable=true
InfiniteScroll 按照官方组件案例使用 均报错异常:Error in directive infinite-scroll inserted hook: "TypeError: Failed to execute 'observe' on 'MutationObserver': parameter 1 is not of type 'Node'."
并且官方在线代码在线运行也均有问题,无法使用。
直接正常使用
直接正常使用
Translation of this issue:
2.9.1
Google Chrome 75.0.3770.80
2.6.10
Https://codepen.io/pen/?&editable=true
InfiniteScroll uses all error-reporting exceptions according to official component cases: Error in directive infinite-scroll insert hook: "TypeError: Failed to execute'observe'on'Mutation Observer': parameter 1 is not of type'Node'."
And the official online code online operation is also problematic, can not be used.
Direct normal use
Direct normal use
我的项目用的TS, 升级到2.9.1 直接引入在 element-ui.d.ts 这个组件的 pluginObject报错了...
这么严重的bug为啥到现在还修复?
export const isScroll = (el, vertical) => {
if (isServer) return;
const determinedDirection = vertical !== null || vertical !== undefined;
const overflow = determinedDirection
? vertical
? getStyle(el, 'overflow-y')
: getStyle(el, 'overflow-x')
: getStyle(el, 'overflow');
return overflow.match(/(scroll|auto)/);
};
export const getScrollContainer = (el, vertical) => {
if (isServer) return;
let parent = el;
while (parent) {
if ([window, document, document.documentElement].includes(parent)) {
return window;
}
if (isScroll(parent, vertical)) {
return parent;
}
parent = parent.parentNode;
}
return parent;
};
查看了一下源码,
需要给元素添加overflow,可以修复;
官方可以考虑如何规避一下这个问题;
需要给元素添加overflow 已补充文档
Most helpful comment
我的项目用的TS, 升级到2.9.1 直接引入在 element-ui.d.ts 这个组件的 pluginObject报错了...