# lazy-loading-xin

> 每当我们一个页面加载到非常多的数组项时，想要实现“滚动触底，加载更多”的效果，可以使用这个插件。

Latest version **1.0.3** (published 2021-10-28) · ISC license · 0 weekly downloads

## Install

```sh
npm install lazy-loading-xin
pnpm add lazy-loading-xin
yarn add lazy-loading-xin
bun add lazy-loading-xin
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2021-10-28 |
| First published | 2021-10-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 19.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | selly_chen |

## Links

- npm: https://www.npmjs.com/package/lazy-loading-xin
- npm.io page: https://npm.io/package/lazy-loading-xin

## Recent versions

- 1.0.3 (latest) — 2021-10-28
- 1.0.2 — 2021-10-28

## README

# PC端滚动触底，加载更多
每当我们一个页面加载到非常多的数组项时，想要实现“滚动触底，加载更多”的效果，可以使用这个插件。

作者：selly_chen(小陈)

## 一、安装

```
npm i lazy-loading-xin -S
```
或
```
yarn add lazy-loading-xin
```

### 二、引入

在vue项目的入口文件 `main.js` 中：

```js
import LoadMore from 'lazy-loading-xin'

Vue.use(LoadMore)
```

### 三、使用

在产品列表组件上做修改，举例：
如原来的组件是这么使用的：

```html
<Products :arr="goodsArr" />
```

现在改为：
```html
<LoadMore :bigarr="goodsArr" :size="8">
      <Products slot-scope="scope" :arr="scope.samllarr" />
    </LoadMore>
```

### 四、关键词备注

- `bigarr` 代表你要渲染的总数据（Array类型）
- `size` 代表你每次滚动要加载多少项(Number类型)
- `samllarr` 代表每次返回出来的新数组

##### 请只填写 `<LoadMore></LoadMore>` 组件上的 `bigarr` 和 `size` 属性的值即可。

---
_Source: https://npm.io/package/lazy-loading-xin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
