
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
scroll-anchor
Advanced tools
实现点击一个锚点(导航),跳转到对应的区块;容器滚动时,对应的锚点高亮; 项目演示地址 http://admin-vuetify.bysir.top:1080/#/anchorScroll
npm i scroll-anchor --save
<div class="main">
<div class="sections">
<div class="section">1</div>
<div class="section">2</div>
<div class="section">3</div>
<div class="section">4</div>
</div>
<div class="anchor-list">
<div class="anchor-item">1</div>
<div class="anchor-item">2</div>
<div class="anchor-item">3</div>
<div class="anchor-item">4</div>
</div>
</div>
import方式 import ScrollAnchor from 'scroll-anchor'
CDN方式<script src="https://unpkg.com/scroll-anchor@1.0.4/dist/index.js"></script>
new ScrollAnchor({
section: 'section',
anchor: 'anchor-item',
paddingTop: 50,
lastActive: true,
duration: 3000,
})
注意: 单页面(vue项目中),在组件销毁的情况下,需要调用实例的滚动事件移除
this.$once('hook:beforeDestroy', () => {
instance.$emit('removeEvent') // 移除滚动事件
})
FAQs
scroll-anchor
The npm package scroll-anchor receives a total of 7 weekly downloads. As such, scroll-anchor popularity was classified as not popular.
We found that scroll-anchor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.