$refs拼接跳转指定位置

实现动态拼接要跳转的位置 scrollToElement(ref, options)
@ref,要滚动到的那个节点。 @options offset,一个到其可见位置的偏移距离,默认是 0。 animated,是否需要附带滚动动画,默认是 true。 下面是官方文档的代码