# scroll-up-el

> > A vue3.x component/一个vue3.x的组件

Latest version **0.2.3** (published 2022-02-07) · 0 weekly downloads

## Install

```sh
npm install scroll-up-el
pnpm add scroll-up-el
yarn add scroll-up-el
bun add scroll-up-el
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.3 |
| Published | 2022-02-07 |
| First published | 2021-11-25 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 146.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | wangbig |
| Keywords | scroll-up, up, roll |

## Links

- npm: https://www.npmjs.com/package/scroll-up-el
- npm.io page: https://npm.io/package/scroll-up-el

## Dependencies (1)

- [vue](https://npm.io/package/vue.md) ^3.2.4

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.2.3 (latest) — 2022-02-07
- 0.2.2 — 2022-02-07
- 0.2.1 — 2021-11-30
- 0.1.9 — 2021-11-29
- 0.1.8 — 2021-11-25
- 0.2.0 — 2021-11-25
- 0.1.7 — 2021-11-25
- 0.1.6 — 2021-11-25
- 0.1.5 — 2021-11-25
- 0.1.4 — 2021-11-25
- 0.1.3 — 2021-11-25
- 0.1.2 — 2021-11-25
- 0.1.1 — 2021-11-25
- 0.1.0 — 2021-11-25

## README

## scroll-up-el

> A vue3.x component/一个vue3.x的组件

### 安装

```
npm i scroll-up-el
```

### 演示

> scrollType = 1

![](https://unpkg.com/scroll-up-el/gif.gif)

> scrollType = 2

![](https://unpkg.com/scroll-up-el/gif1.gif)

### 使用

```js
// main.js
import { createApp } from 'vue'
import App from './App.vue'
import './index.css'
import scollUpEl from "scroll-up-el"

createApp(App).use(scollUpEl).mount('#app');

```

```vue
<!-- Vue -->
<template>
  <div class="scroll">
    <scroll-up-el :data="list" :intTime="1000" isMouseenter @row-click="rowClick">
      <template #default="scope">
       <!-- scope.data.name 是根据Data的值决定 -->
        <div class="scroll_item">{{ scope.data.name }}</div>
      </template>
    </scroll-up-el>
  </div>
</template>

<script>
import { reactive, ref } from "vue";
export default {
  setup() {
    const list = reactive([
      {
        name: "wang",
        type: 1,
      },
      {
        name: "da",
        type: 2,
      },
      {
        name: "pang",
        type: 3,
      },
      {
        name: "zi",
        type: 4,
      },
    ]);
      
    const rowClick = row => {
      console.log(row)
    }

    return {
      list,
      rowClick
    };
  },
};
</script>

<style scoped>
.scroll {
  width: 200px;
  background: rosybrown;
}
.scroll_item {
  width: 100%;
  height: 50px;
  text-align: center;
  line-height: 50px;
}
</style>
```

### 属性

| 属性         | 说明                 | 类型           | 默认值 | 必填  | 可选值 |
| ------------ | -------------------- | -------------- | ------ | ----- | ------ |
| data         | 滚动列表             | Array          | --     | True  | --     |
| intTime      | 停留时间, 最低500    | Number         | 1000   | True  | --     |
| isMouseenter | 鼠标移入是否停止滚动 | Boolean        | false  | False | --     |
| scrollType   | 滚动类型             | String, Number | 1      | False | 1， 2  |

### 方法

| 方法      | 说明                         | 回调参数 |
| --------- | ---------------------------- | -------- |
| row-click | 当某一行被点击时会触发该事件 | row      |

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