1、在v-for 这个div里面加入ref,navList随意命名

2、在挂钩函数created()或者mounted()写下如下函数,总的来说通过这个函数来进行定位:this.$refs.navList[数组列表位置].scrollIntoView({ behavior: 'smooth' })

3、这个是可以水平横向滑动的css样式

相关文章:
-
2022-12-23
-
2021-06-27
-
2022-01-14
-
2021-12-06
-
2021-11-21
-
2022-12-23
-
2023-02-14
-
2021-12-06
猜你喜欢
-
2021-12-21
-
2022-12-23
-
2022-02-07
-
2022-12-23
-
2022-12-23
-
2021-10-26
相关资源
-
下载
2022-12-19
-
下载
2022-12-17
-
下载
2022-12-29
-
下载
2021-06-06
-
下载
2021-06-27