affix 初始检测一次

This commit is contained in:
liaoxuezhi 2019-09-04 15:44:29 +08:00
parent 6bc4c1e870
commit 176f197ad8

View File

@ -44,6 +44,7 @@ export default class Panel extends React.Component<PanelProps> {
this.parentNode = parent; this.parentNode = parent;
parent.addEventListener('scroll', this.affixDetect); parent.addEventListener('scroll', this.affixDetect);
this.unSensor = resizeSensor(dom as HTMLElement, this.affixDetect); this.unSensor = resizeSensor(dom as HTMLElement, this.affixDetect);
this.affixDetect();
} }
componentWillUnmount() { componentWillUnmount() {