# @egjs/react-conveyer 中文文档

规范地址：https://npmcn.com/package/%40egjs/react-conveyer/

版本：1\.8\.1-alpha\.0
npm 元数据更新时间：2025-10-24T06:50:09.878Z
中文译文更新时间：2026-11-13T09:08:47.934Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40egjs/react-conveyer
原文对照：https://npmcn.com/package/%40egjs/react-conveyer/?lang=original
项目主页：https://github.com/naver/egjs-conveyer#readme
源码仓库：https://github.com/naver/egjs-conveyer

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：880 kB，42 个文件
- 模块格式：ESM + CJS
- TypeScript 类型：包内自带
- 运行依赖：2 个
- 首次发布：2022-02-22T05:51:32.639Z
- 最新版本发布：2025-09-17T17:56:38.308Z
- 近 30 天下载量：18809（2026-10-13 至 2026-11-11，npm 官方下载统计）
- 已发布版本数：36（近 12 个月 0 个）

## 中文简介

React Conveyer 在您的原始相册中添加了 Drag 手势 .

## 安装

```sh
npm install @egjs/react-conveyer
```

也可以使用：`pnpm add @egjs/react-conveyer`、`yarn add @egjs/react-conveyer`、`bun add @egjs/react-conveyer`

## README

# ![Conveyer Logo](https://naver.github.io/egjs-conveyer/img/logo.png)  
[反射对讲机](https://naver.github.io/egjs-conveyer/)

[![version](https://img.shields.io/npm/v/@egjs/conveyer.svg?style=flat-square&color=007acc&label=version&logo=NPM)](https://www.npmjs.com/package/@egjs/react-conveyer) [![npm weekly downloads](https://img.shields.io/npm/dw/@egjs/conveyer?logo=npm&style=flat-square&color=007acc)](https://www.npmjs.com/package/@egjs/react-conveyer) [![npm bundle size (scoped)](https://img.shields.io/bundlephobia/minzip/@egjs/react-conveyer.svg?style=flat-square&label=%F0%9F%92%BE%20gzipped&color=007acc)](https://www.npmjs.com/package/@egjs/react-conveyer) [![Github actions](https://img.shields.io/github/workflow/status/naver/egjs-conveyer/Run%20tests?style=flat-square)](https://github.com/naver/egjs-conveyer/actions) [![Coveralls github](https://img.shields.io/coveralls/github/naver/egjs-conveyer.svg?style=flat-square&label=%E2%9C%85%20coverage)](https://coveralls.io/github/naver/egjs-conveyer?branch=master&style=flat-square) [![](https://img.shields.io/static/v1?style=flat-square&label=%F0%9F%93%9C%20license&message=MIT&color=08CE5D)](https://github.com/naver/egjs-conveyer/blob/main/LICENSE) ![](https://img.shields.io/static/v1.svg?label=&message=TypeScript&color=294E80&style=flat-square&logo=typescript)

### [演示](https://naver.github.io/egjs-conveyer/) 编号 : [文档](https://naver.github.io/egjs-conveyer/docs/api/Conveyer) 编号 : [![](https://naver.github.io/egjs/img/logo.svg) 其他构成部分](https://naver.github.io/egjs/)

**Conveyer在您的原生相册中加入了 Drag 手势 .**  
📱💻🖥

* * *

## \* 特性

-   您可以通过 Drag 使用类似 原生 Scroll 的行为 .
-   通过增加回放,弹性等放松功能,可以创建出"原生"等平滑滚动动画.
-   支持反应属性,通过自动检测变化而不是事件的属性可以改变状态.
-   您可以使用自定义卷轴事件, 如BeginScroll、FinishScroll、ReachStart、LeaveStart,

## \* 安装

```bash
$ npm install @egjs/react-conveyer
```

## QQ 快速启动

### 使用交汇器方法的结果

-   你用得着 [反应属性](https://naver.github.io/egjs-conveyer/docs/api/Conveyer#properties) 财务报告和审定财务报表 [方法](https://naver.github.io/egjs-conveyer/docs/api/Conveyer#methods)。 。 。 .
-   你用得着 [事件](https://naver.github.io/egjs-conveyer/docs/api/Conveyer#events) 带有使用前缀的骆驼Case名称.

```jsx
import { useConveyer } from "@egjs/react-conveyer";

function App() {
  const ref = useRef<HTMLDivElement>(null);
  const {
    // reactive properties
    isReachStart,
    isReachEnd,
    // methods
    scrollIntoView,
    // events
    onBeginScroll,
    onFinishScroll,
  } = useConveyer(ref, {
    horizontal: false,
  });

  onBeginScroll(() => {
    console.log("begin scroll");
  }, []);
  onFinishScroll(() => {
    console.log("finish scroll");
  }, []);

  return (
    <div className="App">
      <button id="prev" disabled={isReachStart} onClick={() => {
        // start to end
        scrollIntoView("start", {
          align: "end",
          duration: 500,
        });
      }}>PREV</button>
      <button id="next" disabled={isReachEnd} onClick={() => {
        // end to start
        scrollIntoView("end", {
          align: "start",
          duration: 500,
        });
      }}>NEXT</button>
      <div className="items" ref={ref}>
        <div className="item"><a href="#1">1</a></div>
        <div className="item"><a href="#2">2</a></div>
        <div className="item"><a href="#3">3</a></div>
        <div className="item"><a href="#4">4</a></div>
        <div className="item"><a href="#5">5</a></div>
        <div className="item"><a href="#6">6</a></div>
        <div className="item"><a href="#7">7</a></div>
        <div className="item"><a href="#8">8</a></div>
        <div className="item"><a href="#9">9</a></div>
        <div className="item"><a href="#10">10</a></div>
        <div className="item"><a href="#11">11</a></div>
        <div className="item"><a href="#12">12</a></div>
      </div>
    </div>
  );
}
```

## QQ 支持的浏览器

| ![IE](https://simpleicons.org/icons/internetexplorer.svg) | ![Chrome](https://simpleicons.org/icons/googlechrome.svg) | ![Firefox](https://simpleicons.org/icons/firefoxbrowser.svg) | ![Safari](https://simpleicons.org/icons/safari.svg) | ![iOS](https://simpleicons.org/icons/apple.svg) | ![Android](https://simpleicons.org/icons/android.svg) |
| :-: | :-: | :-: | :-: | :-: | :-: |
| 9+( 带有多填充), 11+ 对角 & Svelte | 最新 | 最新 | 最新 | 7个+ | 4+ (中文(简体) ) |

## 德摩斯语

检查我们 [演示文稿](https://naver.github.io/egjs-conveyer/)。 。 。 .

## 页:1

见 [文档](https://naver.github.io/egjs-conveyer/docs/api/Conveyer) 页 次.

## 捐款

见 [捐款额](https://github.com/naver/egjs-conveyer/blob/main/CONTRIBUTING.md)。 。 。 .

## \* 反馈

请存档 [问题](https://github.com/naver/egjs-conveyer/issues)。 。 。 .

## 许可证

@egjs/ react-conveyer 发布在下面 [麻省理工学院许可证](https://github.com/naver/egjs-conveyer/blob/main/LICENSE)。 。 。 .

```
Copyright (c) 2022-present NAVER Corp.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
```

[![](https://naver.github.io/egjs/img/logotype1_black.svg)](https://naver.github.io/egjs/)      [![](https://naver.github.io/OpenSourceGuide/book/assets/naver_logo.png)](https://github.com/naver)

## 常见问题

### @egjs/react-conveyer 是什么？

React Conveyer 在您的原始相册中添加了 Drag 手势 \.

### 如何安装 @egjs/react-conveyer？

在项目目录运行 npm install @egjs/react-conveyer，或使用 pnpm add / yarn add / bun add。

### @egjs/react-conveyer 支持 TypeScript 吗？

支持。包内自带 TypeScript 类型声明（package\.json 声明了 types 入口），安装后即可获得类型提示，无需再安装 @types 包。

### @egjs/react-conveyer 支持 ESM 还是 CommonJS？

同时提供 ES Module 与 CommonJS 入口，import 和 require\(\) 都可以使用，打包工具会自动选择合适的版本。

### @egjs/react-conveyer 可以商用吗？

@egjs/react-conveyer 使用 MIT 许可。宽松许可：允许商业使用、修改和再分发，通常只需在分发时保留原版权与许可声明。以上为概括，不构成法律意见，请以许可原文为准。

### @egjs/react-conveyer 的下载量有多少？

根据 npm 官方下载统计，@egjs/react-conveyer 在 2026/10/13 – 2026/11/11 这 30 天内被下载 18,809 次，日均约 627 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @egjs/react-conveyer 还在维护吗？

最新版本 1\.8\.1-alpha\.0 发布于 2025/09/18（1\.2 年前）；至今共发布 36 个版本，其中过去 12 个月发布了 0 个；首次发布于 2022/02/22。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

