# @arcgis/common-components 中文文档

规范地址：https://npmcn.com/package/%40arcgis/common-components/

版本：5\.2\.2
npm 元数据更新时间：2026-11-10T17:07:58.255Z
中文译文更新时间：2026-11-10T16:40:01.210Z
软件包许可：SEE LICENSE IN LICENSE\.md

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

原始 npm 页面：https://www.npmjs.com/package/%40arcgis/common-components
原文对照：https://npmcn.com/package/%40arcgis/common-components/?lang=original
项目主页：https://developers.arcgis.com/javascript/latest/

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

- 包体积（解压后）：7.5 MB，727 个文件
- 模块格式：ES Module
- TypeScript 类型：包内自带
- 运行依赖：7 个
- peer 依赖：@arcgis/core 5\.2\.2，@esri/calcite-components ^5\.2\.1
- 首次发布：2023-09-06T12:01:01.795Z
- 最新版本发布：2026-11-10T16:39:27.362Z
- 近 30 天下载量：191091（2026-10-07 至 2026-11-05，npm 官方下载统计）
- 已发布版本数：556（近 12 个月 449 个）

## 中文简介

用于 JavaScript 常见组件的 ArcGIS 映射 SDK

## 安装

```sh
npm install @arcgis/common-components
```

也可以使用：`pnpm add @arcgis/common-components`、`yarn add @arcgis/common-components`、`bun add @arcgis/common-components`

## README

# JavaScript - 常见组件的ArcGIS地图 SDK

用于JavaScript的ArcGIS地图SDK提供了一套即用UI组件来简化GIS网络应用程序的创建过程. 此软件包包含 [直方图](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-histogram/), (中文(简体) ), [幻灯片](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/),以及 [选项](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-ticks/) 组件.

想马上开始吗? 见 [开始吧](https://developers.arcgis.com/javascript/latest/get-started/) 或者试试看 [样本应用](https://developers.arcgis.com/javascript/latest/sample-code/?tagged=common-components)。 。 。 .

## 文档

-   [关键特性](https://developers.arcgis.com/javascript/latest/key-features/)
-   [用 npm 构建](https://developers.arcgis.com/javascript/latest/get-started/#use-arcgiscreate)
-   [API 和组件参考](https://developers.arcgis.com/javascript/latest/references/)
-   [功能样本](https://developers.arcgis.com/javascript/latest/sample-code/)
-   [类型脚本设置](https://developers.arcgis.com/javascript/latest/get-started/#typescript)

## 资源

-   [ArcGIS 博客](https://blogs.esri.com/esri/arcgis/tag/javascript/)
-   [系统要求](https://developers.arcgis.com/javascript/latest/system-requirements/)
-   [使用条件](https://www.esri.com/en-us/legal/terms/product-specific-scope-of-use)
-   [许可证发放](https://developers.arcgis.com/javascript/latest/licensing/)
-   [与 `next` 版本](https://github.com/Esri/feedback-js-api-next/blob/main/README.md)

## 问题

-   关于使用此软件包或用于 JavaScript 的 ArcGIS Maps SDK 的普通问题 ? 见 [Esri开发者社区](https://community.esri.com/t5/arcgis-api-for-javascript/ct-p/arcgis-api-for-javascript)。 。 。 .
-   [技术支持](https://support.esri.com/)。 。 。 .

## 许可证

该软件包根据下列条款获得许可: `LICENSE.md` 文件,位于软件包的根,并在 [https://js.arcgis.com/5.2/LICENSE.txt](https://js.arcgis.com/5.2/LICENSE.txt)。 。 。 . 关于第三方通知,见 [https://js.arcgis.com/5.2/第三方-通知.txt](https://js.arcgis.com/5.2/third-party-notices.txt)。 。 。 .

## 常见问题

### @arcgis/common-components 是什么？

用于 JavaScript 常见组件的 ArcGIS 映射 SDK

### 如何安装 @arcgis/common-components？

在项目目录运行 npm install @arcgis/common-components，或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖：@arcgis/core（5\.2\.2）、@esri/calcite-components（^5\.2\.1）。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖，Yarn 需要手动安装。

### @arcgis/common-components 支持 TypeScript 吗？

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

### @arcgis/common-components 支持 ESM 还是 CommonJS？

以 ES Module 形式发布，推荐使用 import 引入。在 CommonJS 项目中，Node\.js 20\.19\+ / 22\.12\+ 可以直接 require\(\) 不含顶层 await 的 ES Module，更早的版本需要改用动态 import\(\)。

### @arcgis/common-components 可以商用吗？

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

### @arcgis/common-components 的下载量有多少？

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

### @arcgis/common-components 还在维护吗？

最新版本 5\.2\.2 发布于 2026/11/11（今天）；至今共发布 556 个版本，其中过去 12 个月发布了 449 个；首次发布于 2023/09/06。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

