@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.
|
@@ -380,7 +380,7 @@ export class ScrollAlarmElement extends ConditionalDynamicDisplayElement {
|
|
|
380
380
|
if (this.displayedItems.length <= 0)
|
|
381
381
|
return;
|
|
382
382
|
// 每次滚动的距离
|
|
383
|
-
const scrollStep =
|
|
383
|
+
const scrollStep = 2; // 减小滚动步长,使滚动更平滑
|
|
384
384
|
// 更新位置 - 从右往左滚动
|
|
385
385
|
this.currentLeft -= scrollStep;
|
|
386
386
|
// 检查是否需要加载下一页(只有在自动循环模式下才需要预加载)
|
|
@@ -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 =
|
|
793
|
+
// 保持滚动位置不变,继续滚动
|
|
794
|
+
this.currentLeft = currentScrollPosition;
|
|
793
795
|
this.allAlarmsContainer.style.left = `${this.currentLeft}px`;
|
|
794
796
|
}
|
|
795
797
|
});
|