Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
better-scroll-list
Advanced tools
A pull-up load and drop-down refresh data plugin
Better-scroll-list encapsulates better-scroll pull-down and pull-up capabilities, and encapsulates some of its events and methods
npm install --save better-scroll-list
import VueScroll from 'better-scroll-list'
Vue.use(VueScroll)
<vue-scroll></vue-scroll>
parameter | type | default | description |
---|---|---|---|
scrollbar | Boolean | true | Whether to display the scroll bar |
scrollbarFade | Boolean | true | Show hidden scroll bar transition effect |
pullDownRefresh | Boolean | true | Whether to initialize the pull-down refresh |
pullDownRefreshThreshold | Number | 90 | Top pull-down distance |
pullDownRefreshStop | Number | 40 | Refresh time and the distance to stay rebound |
pullDownRefreshTxt | String | 刷新成功 | Text displayed when refresh is successful |
pullDownRefreshFailTxt | String | 刷新失败 | Text displayed when refresh is failed |
pullUpLoad | Boolean | true | Whether to initialize the pull-up load |
pullUpLoadThreshold | Number | 0 | Bottom distance threshold |
pullUpLoadMoreTxt | String | 加载更多 | Text displayed when there is more data |
pullUpLoadNoMoreTxt | String | 没有更多了 | Text displayed when there is no more data |
direction | String | vertical | The default is vertical scrolling, if you want horizontal scrolling, you need to pass horizontal, but the horizontal scrolling temporarily does not support the pull-down refresh download |
click | Boolean | false | When set to true, better-scroll will dispatch a click event, and we will add a private property to the dispatched event parameter, _constructed, to true |
probeType | Number | 0 | Please refer to the better-scroll probeType |
tap | Boolean | false | Because better-scroll prevents native click events, we can set tap to true, which dispatches a tap event when the zone is clicked, and you can listen to it as you would a native event |
refreshDelay | Number | 20 | Data change refreshing scroll interval, in milliseconds |
initMinHeight | Boolean | true | Whether to automatically add the minimum height of the scroll zone |
listenScroll | Boolean | false | Whether to listen for scroll events |
listenBeforeScroll | Boolean | false | Whether to listen beforeScrollStart event |
listenScrollStart | Boolean | false | Whether to listen for the scrollStart event |
listenScrollEnd | Boolean | false | Whether to listen for the scrollEnd event |
listenTouchEnd | Boolean | false | Whether to listen for the touchEnd event |
listenFlick | Boolean | false | Whether to listen for the flick event |
listenRefresh | Boolean | false | Whether to listen for the refresh event |
listenDestroy | Boolean | false | Whether to listen for the destroy event |
Please refer to the detailed configuration better-scroll docs
name | parameter |
---|---|
pulling-up | - |
pulling-down | - |
before-scroll-start | - |
scroll-start | pos |
scroll | pos |
scroll-end | pos |
touch-end | pos |
flick | - |
refresh | - |
destroy | - |
tap | - |
click | - |
name | description |
---|---|
disable | disable scroll |
enable | enable scroll |
refresh | refresh scroll area |
destroy | destroy scroll |
scrollTo | instance |
scrollToElement | See the official document |
rebuild | See the official document |
forceUpdate | called wehn pull-down refresh success and pull-up load success |
errorUpdate | called wehn pull-down refresh failed and pull-up load failed |
<vue-scroll ref="scroll" :listenScroll="listenScroll" @scroll="onScroll" @before-scroll-start="onBeforeScrollStart" :pulling-up="onPullingUp"></vue-scroll>
export default {
methods: {
onBeforeScrollStart() {
...
}
}
}
export default {
created() {
this.listenScroll = true
},
methods: {
onBeforeScrollStart() {
...
},
onScroll(pos) {
console.log(pos)
}
}
}
export default {
methods: {
onBeforeScrollStart() {
...
},
onPullingUp() {
this.$refs.scroll.errorUpdate()
}
}
}
FAQs
A pull-up load and drop-down refresh data plugin
The npm package better-scroll-list receives a total of 1 weekly downloads. As such, better-scroll-list popularity was classified as not popular.
We found that better-scroll-list 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.