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

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.
@@ -42588,7 +42588,7 @@ class scroll_alarm_element_ScrollAlarmElement extends conditional_dynamic_displa
42588
42588
  if (this.displayedItems.length <= 0)
42589
42589
  return;
42590
42590
  // 每次滚动的距离
42591
- const scrollStep = 6; // 减小滚动步长,使滚动更平滑
42591
+ const scrollStep = 2; // 减小滚动步长,使滚动更平滑
42592
42592
  // 更新位置 - 从右往左滚动
42593
42593
  this.currentLeft -= scrollStep;
42594
42594
  // 检查是否需要加载下一页(只有在自动循环模式下才需要预加载)
@@ -42934,6 +42934,8 @@ class scroll_alarm_element_ScrollAlarmElement extends conditional_dynamic_displa
42934
42934
  }
42935
42935
  return;
42936
42936
  }
42937
+ // 保存当前的滚动位置
42938
+ const currentScrollPosition = this.currentLeft;
42937
42939
  // 清空所有DOM元素
42938
42940
  this.allAlarmsContainer.innerHTML = '';
42939
42941
  // 获取语言设置
@@ -42996,8 +42998,8 @@ class scroll_alarm_element_ScrollAlarmElement extends conditional_dynamic_displa
42996
42998
  this.totalWidth = newTotalWidth;
42997
42999
  this.pageWidths = [newTotalWidth]; // 重置为单页
42998
43000
  this.hasMoreData = result.totalCount > newItems.length;
42999
- // 收到新告警时,重置滚动位置到容器右侧,确保新内容能被滚动出来显示
43000
- this.currentLeft = this.container.clientWidth;
43001
+ // 保持滚动位置不变,继续滚动
43002
+ this.currentLeft = currentScrollPosition;
43001
43003
  this.allAlarmsContainer.style.left = `${this.currentLeft}px`;
43002
43004
  }
43003
43005
  });