点击右侧实现锚点跳转,类似于下方这样的操作
uview中提供了一个select方法,很多人写了之后发现没用,因为锚点的实现并不需要此方法
直接在u-index-anchor添加id和index就可以了
我这里只是一个例子,你的id或者index的写法可能和我的不一样
<u-index-anchor
:id="item.key"
:index="item.key"
>
<text class="anchor-text">
{{ item.key }}
</text>
</u-index-anchor>