html
红色框部分必填
scroll-x 代表横向滚动
:scroll-into-view="seqToView" 代表视图激活
scroll-with-animation="true" 代表开启滚动动画
:id="'seq-' + index" 代表指定索引
data
seqToView: ' ',初始化激活视图为null
js
this.seqToView = 'seq-' + this.current 因为是循环数据 将每一个视图id循环进指定索引中
注意 :1、this.seqToView不能是中文或则数字做开头
2、要在获取完数据之后再赋值