Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
vue3-infinite-scroll-better
Advanced tools
支持Vue3的滚动加载插件,所有用法和vue-infinite-scroll一致。并解决了一些bug。
npm install vue3.0-infinite-scroll --save
参数 | 说明 | 类型 | 默认值 | 版本 |
---|---|---|---|---|
infinite-scroll-throttle-delay | 滚动延迟 | number | 200 | |
infinite-scroll-disabled | 是否禁止 | boolean | false | |
infinite-scroll-distance | 滚动条距离底部的距离 | number | 0 | |
infinite-scroll-immediate-check | 是否立即触发滚动 | boolean | true | |
infinite-scroll-watch-disabled | 与infinite-scroll-disabled 绑定的对应值 | string | null |
指令名称 | 说明 | 回调参数 | 版本 |
---|---|---|---|
v-infinite-scroll | 指令,执行滚动触发的事件 | () => void | - |
import infiniteScroll from 'vue3.0-infinite-scroll'
app.use(infiniteScroll).mount('#app')
<div
class="list-lis"
v-infinite-scroll="handleInfiniteOnLoad"
:infinite-scroll-immediate-check="false"
:infinite-scroll-disabled="scrollDisabled"
infinite-scroll-watch-disabled="scrollDisabled"
:infinite-scroll-distance="20">
<ul>
<li v-for="(item, index) in renderDataList" :key="index">
<a
:href="item.url"
target="_blank"
rel="noopener"
>{{index + 1}}、{{item.name}}</a
>
</li>
<div v-if="scrollDisabled">数据加载完毕</div>
</ul>
</div>
setup(props, context) {
const renderDataList = [] // 数据列表
const listCount = 50
const handleInfiniteOnLoad = () => {
// 异步加载数据等逻辑
if (scrollDisabled) {
// 数据加载完毕
} else {
// 加载数据列表
}
}
const scrollDisabled = computed(() => renderDataList.length >= listCount)
return {
scrollDisabled,
renderDataList,
handleInfiniteOnLoad
}
}
FAQs
支持Vue3的滚动加载插件,所有用法和vue-infinite-scroll一致。并解决了一些bug。
The npm package vue3-infinite-scroll-better receives a total of 92 weekly downloads. As such, vue3-infinite-scroll-better popularity was classified as not popular.
We found that vue3-infinite-scroll-better 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.