vue实现滚动监听,锚点定位的目录(根据文章浏览位置,目录高亮相应标题)
先上效果图跟代码,然后逐步分析思路跟方法的作用<template> <div class="container"> <div class="wrapper"> <div class="section" style="height:500px;width:100%" v-for="(item, index) in list" :key="index" :style="{'height':index==0?'1000px':'500px'}"
原创
2020-07-17 16:41:15 ·
7070 阅读 ·
1 评论