@flexem/fc-gui 3.0.0-alpha.135 → 3.0.0-alpha.136

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -726,6 +726,8 @@ export class ScrollAlarmElement extends ConditionalDynamicDisplayElement {
726
726
  }
727
727
  return;
728
728
  }
729
+ // 保存当前的滚动位置
730
+ const currentScrollPosition = this.currentLeft;
729
731
  // 清空所有DOM元素
730
732
  this.allAlarmsContainer.innerHTML = '';
731
733
  // 获取语言设置
@@ -788,8 +790,8 @@ export class ScrollAlarmElement extends ConditionalDynamicDisplayElement {
788
790
  this.totalWidth = newTotalWidth;
789
791
  this.pageWidths = [newTotalWidth]; // 重置为单页
790
792
  this.hasMoreData = result.totalCount > newItems.length;
791
- // 收到新告警时,重置滚动位置到容器右侧,确保新内容能被滚动出来显示
792
- this.currentLeft = this.container.clientWidth;
793
+ // 保持滚动位置不变,继续滚动
794
+ this.currentLeft = currentScrollPosition;
793
795
  this.allAlarmsContainer.style.left = `${this.currentLeft}px`;
794
796
  }
795
797
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "main": "bundles/fc-gui.umd.js",
3
- "version": "3.0.0-alpha.135",
3
+ "version": "3.0.0-alpha.136",
4
4
  "module": "public_api.js",
5
5
  "typings": "public_api.d.ts",
6
6
  "license": "UNLICENSED",