# neumedia-water-fall

> 数据列表呈瀑布流形式展示。通过上下拖拽的操作，重新刷新页面数据，或加载更多列表数据。

Latest version **1.1.1** (published 2020-11-19) · 0 weekly downloads

## Install

```sh
npm install neumedia-water-fall
pnpm add neumedia-water-fall
yarn add neumedia-water-fall
bun add neumedia-water-fall
```

## 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.1.1 |
| Published | 2020-11-19 |
| First published | 2020-08-18 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 28.8 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | hliang-321 |

## Links

- npm: https://www.npmjs.com/package/neumedia-water-fall
- npm.io page: https://npm.io/package/neumedia-water-fall

## Dependencies (3)

- [vue](https://npm.io/package/vue.md) ^2.6.11
- [core-js](https://npm.io/package/core-js.md) ^3.6.5
- [vue-waterfall2](https://npm.io/package/vue-waterfall2.md) ^1.10.1

## Recent versions

- 1.1.1 (latest) — 2020-11-19
- 1.1.0 — 2020-09-16
- 1.0.1 — 2020-08-19
- 0.1.0 — 2020-08-18

## README

# 瀑布流列表

数据列表呈瀑布流形式展示。通过上下拖拽的操作，重新刷新页面数据，或加载更多列表数据。



## 更新历史

| 版本号 | 作者                    | 更新记录 | 更新时间   |
| ------ | ----------------------- | -------- | ---------- |
| 1.0.0  | huang.liang@neusoft.com | 初始版本 | 2020.08.04 |
|        |                         |          |            |



## 安装

```shell
npm install neumedia-water-fall
```



## 导入

```javascript
import WaterFall from 'neumedia-water-fall';

export default {
    components: {
        WaterFall
    },
    data() {
        return {
            page: 1,
            list: []
        };
    },
    methods: {
        getList(page) {
            // 获取第 page 页数据，并 return 返回
        },
        handleRefresh() {
            this.page = 1;
            return this.getList(this.page);
        },
        handleLoadPage() {
            let list = this.getList(this.page);
            this.page = this.page + 1;
            return list;
        }
    }
}
```



## 使用

```html
<water-fall v-model="list" :handle-more="handleLoadPage" :handle-refresh="handleRefresh"></water-fall>
```



## API

### Props

| 说明           | 说明                                 | 类型     | 默认值        |
| -------------- | ------------------------------------ | -------- | ------------- |
| value(v-model) | 列表内容                             | Array    | []            |
| col            | 列数                                 | Number   | 2             |
| handle-more    | 注册上拉加载数据方法（返回单页数据） | Function | function() {} |
| handle-refresh | 注册下拉刷新数据方法（返回单页数据） | Function | function() {} |

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