# @cardscan\.ai/insurance-cardscan-react 中文文档

规范地址：https://npmcn.com/package/%40cardscan.ai/insurance-cardscan-react/

版本：4\.0\.21
npm 元数据更新时间：2025-07-25T02:18:32.628Z
中文译文更新时间：2026-11-09T10:51:01.649Z
软件包许可：SEE LICENSE IN LICENSE\.md

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

原始 npm 页面：https://www.npmjs.com/package/%40cardscan.ai/insurance-cardscan-react
原文对照：https://npmcn.com/package/%40cardscan.ai/insurance-cardscan-react/?lang=original
项目主页：https://docs.cardscan.ai/ui-components/react
源码仓库：https://github.com/CardScan-ai/insurance-cardscan-react

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

- 包体积（解压后）：11.7 MB，72 个文件
- 模块格式：ESM + CJS
- TypeScript 类型：包内自带
- 运行依赖：11 个
- peer 依赖：react \>=17\.0\.2，react-dom \>=17\.0\.2
- 首次发布：2021-09-16T23:50:08.775Z
- 最新版本发布：2025-07-25T02:18:32.425Z
- 近 30 天下载量：2876（2026-10-09 至 2026-11-07，npm 官方下载统计）
- 已发布版本数：96（近 12 个月 0 个）

## 中文简介

一个便于在任何网络应用程序中添加医疗保险卡扫描的图书馆

## 安装

```sh
npm install @cardscan.ai/insurance-cardscan-react
```

也可以使用：`pnpm add @cardscan.ai/insurance-cardscan-react`、`yarn add @cardscan.ai/insurance-cardscan-react`、`bun add @cardscan.ai/insurance-cardscan-react`

## README

# CardScan.ai: 重现部件

[纸牌扫描](https://www.cardscan.ai/) 是在您的手机或网络应用程序中添加医疗保险卡扫描的最快方式.

  
![drawing](https://cardscan-assets.s3.amazonaws.com/documentation/Card-JSON-small.jpeg)  

* * *

  

[纸牌扫描](https://www.cardscan.ai/) 有支持扫描的 UI 部件 [网络](https://docs.cardscan.ai/ui-components/react), (中文(简体) ), [移动网络](https://docs.cardscan.ai/ui-components/react),蝶,反应原生,原生 [iOS系统](https://docs.cardscan.ai/ui-components/ios) 财务报告和审定财务报表 [机器人](https://docs.cardscan.ai/ui-components/android)或使用 [API 密码](https://docs.cardscan.ai/api) 建立你自己的实施.

### 部件特性 :

-   智能卡检测
-   自动手动抓取( M)
-   自定义用户提示
-   浏览器/ Device 权限帮助器
-   重试失败的低质量扫描( L)
-   响应UI
-   网络到移动手势

  

![drawing](https://cardscan-assets.s3.amazonaws.com/documentation/Web-Scan.gif)  

  

### 基本示例:

```jsx
import React from "react";
import { render } from "react-dom";
import {CardScanView} from "@cardscan.ai/insurance-cardscan-react";

function onSuccess(card: any) {
  console.log("new card: ", card);
}

// See Authentication on where to get this token.
const token = 'JWT_TOKEN'

// Render CardScanView
render(
  <CardScanView
    live={false}
    sessionToken={token}
    onSuccess={onSuccess}
    />
  ,document.getElementById("root")
);
```

### 兼容性

-   **节点版本**: 14、16、18
-   **反应版本**: QQ17.02, 18.2.0+ (中文(简体) )
-   **Web 软件包版本**: 4.x, 5.x (中文(简体) )
-   **Babel 版本**: 6.x, 7.x (中文(简体) )

### 同伴依赖关系

-   **反应**页:1
-   **反应-DOM**页:1

## 文档

检查 [完整文档](https://docs.cardscan.ai/) 财务报告和审定财务报表 [重现部件文件](https://docs.cardscan.ai/ui-components/react)。 。 。 .

## 常见问题

### @cardscan\.ai/insurance-cardscan-react 是什么？

一个便于在任何网络应用程序中添加医疗保险卡扫描的图书馆

### 如何安装 @cardscan\.ai/insurance-cardscan-react？

在项目目录运行 npm install @cardscan\.ai/insurance-cardscan-react，或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖：react（\>=17\.0\.2）、react-dom（\>=17\.0\.2）。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖，Yarn 需要手动安装。

### @cardscan\.ai/insurance-cardscan-react 支持 TypeScript 吗？

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

### @cardscan\.ai/insurance-cardscan-react 支持 ESM 还是 CommonJS？

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

### @cardscan\.ai/insurance-cardscan-react 可以商用吗？

@cardscan\.ai/insurance-cardscan-react 使用 SEE LICENSE IN LICENSE\.md 许可。许可条款写在包内的独立文件中，请阅读该文件确认可否商用。以上为概括，不构成法律意见，请以许可原文为准。

### @cardscan\.ai/insurance-cardscan-react 的下载量有多少？

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

### @cardscan\.ai/insurance-cardscan-react 还在维护吗？

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

