Skip to content

[Bug Report] NoticeBar溢出滚动时,无法从初始最左侧位置开始滚动,滚动效果和文档预览不一致 #4656

Closed
@wiexin

Description

@wiexin

设备

手机、微信开发者工具

VantWeapp 版本

1.9.2

基础库版本

2.10.4

请提供核心代码片段链接

https://github.com/youzan/vant-weapp/blob/dev/dist/notice-bar/index.js

描述问题

文档溢出滚动效果:文字从初始位置,最左侧开始滚动
组件实际效果:文字从最右侧开始滚动
原因:组件第一次执行scroll方法时,this.resetAnimation.translateX(this.wrapWidth)直接把滚动内容偏移到了最右侧
期望:和文档效果一样,从内容初始位置开始滚动

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions