可以设置friction摩擦系数减少灵敏度,见demo:Scroll(this.scroller) { Row({ space: this.swiperOptions.itemSpace }) { ForEach(this.swiperDataList, (model: string, index: number) => { this.customContentBuilder(model, index) }, (model: string, index: number) => JSON.stringify(model) + index) } } .width('100%') .scrollable(ScrollDirection.Horizontal) .scrollBar(BarState.Off) .enabled(true) .align(Alignment.Start) .edgeEffect(EdgeEffect.None) .scrollSnap({ snapPagination: this.swiperItemWidth + this.swiperOptions.itemSpace, snapAlign: ScrollSnapAlign.START }) .friction(4) //设置摩擦系数,手动划动滚动区域时生效,只对惯性滚动过程有影响,数值越大摩擦越大,可自行适配参考文档:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/ts-container-scroll-V5\#friction10
可以设置friction摩擦系数减少灵敏度,见demo:
参考文档:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/ts-container-scroll-V5\#friction10