
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
vue-scroll-view-mobile
Advanced tools
一个基于vue2.0.js移动端的原生scroll组件, 由原来的native-scroll更名为vue-scroll-view-mobile,添加事件节流,时间间隔600ms,提升性能;优化了缓动动画效果
npm 安装
npm install vue-scroll-view-mobile --save
全局注册
import Vue from 'vue'
import {ScrollView} from 'vue-scroll-view-mobile'
Vue.use(ScrollView)
<template>
<div class="section" ref="scrollView">
<native-scroll>
<!-- 你的内容 -->
</native-scroll>
</div>
</template>
<style lang="scss">
.section {
// 必须要有一个高度
position: fixed;
width: 100%;
height: 500px;
}
</style>
类型function
用法:
<!-- 商品详情页面 -->
<section class="section">
<native-scroll ref="myScroll" @scrolling="onScroll" @scroll-lower="nextPage">
<!-- 其他内容 -->
<section class="detail" ref="detail">
<!-- 商品图文介绍 -->
</section>
</native-scroll>
</section>
methods: {
onScroll(pos) {
// 未做节流处理
console.log(pos)
},
nextPage() {
// this.$axios....
},
// 返回顶部
goBack() {
this.$refs.myScroll.scrollTo(0)
}
// 去到制定dom节点位置
goElement() {
this.$refs.myScroll.scrollToElement(this.$refs.detail)
}
}
<style lang="scss">
.section {
// 必须要有一个高度
width: 100%;
height: 500px;
}
</style>
For detailed explanation on how things work, consult the docs for vue-loader.
FAQs
scroll-view component for mobile
The npm package vue-scroll-view-mobile receives a total of 2 weekly downloads. As such, vue-scroll-view-mobile popularity was classified as not popular.
We found that vue-scroll-view-mobile 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.