# @antelopejs/dms-frontend 中文文档

规范地址：https://npmcn.com/package/%40antelopejs/dms-frontend/

版本：0\.10\.0
npm 元数据更新时间：2026-11-04T19:49:48.546Z
中文译文更新时间：2026-11-06T06:27:35.096Z
软件包许可：Apache-2\.0

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

原始 npm 页面：https://www.npmjs.com/package/%40antelopejs/dms-frontend
原文对照：https://npmcn.com/package/%40antelopejs/dms-frontend/?lang=original
项目主页：https://dms.antelopejs.com/docs/frontend
源码仓库：https://github.com/AntelopeJS/dms-frontend

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

- 包体积（解压后）：882 kB，247 个文件
- 模块格式：CommonJS
- TypeScript 类型：包内自带
- Node.js 要求：\>=20\.19\.0
- 运行依赖：5 个
- peer 依赖：@antelopejs/core \>=1\.16\.0 \<2
- 首次发布：2026-09-16T22:55:37.806Z
- 最新版本发布：2026-11-04T19:49:48.200Z
- 近 30 天下载量：9205（2026-10-06 至 2026-11-04，npm 官方下载统计）
- 已发布版本数：54（近 12 个月 54 个）

## 中文简介

AntelopeJS DMS的前端不可知载荷器,运送Vue 3 渲染器(Vite, Inertia, SSR)

## 安装

```sh
npm install @antelopejs/dms-frontend
```

也可以使用：`pnpm add @antelopejs/dms-frontend`、`yarn add @antelopejs/dms-frontend`、`bun add @antelopejs/dms-frontend`

## README

![AntelopeJS DMS](https://raw.githubusercontent.com/AntelopeJS/dms/main/packages/dms/frontend-vue/layers/dms-layout/public/images/antelope-logo/light.svg)

# `@antelopejs/dms-frontend`

[![npm](https://img.shields.io/npm/v/@antelopejs/dms-frontend?style=for-the-badge&labelColor=000000&color=000000)](https://www.npmjs.com/package/@antelopejs/dms-frontend) [![License](https://img.shields.io/npm/l/@antelopejs/dms-frontend?style=for-the-badge&labelColor=000000&color=000000)](https://npmcn.com/package/%40antelopejs/dms-frontend/LICENSE) [![Discord](https://img.shields.io/badge/Discord-18181B?logo=discord&style=for-the-badge&color=000000)](https://discord.gg/g4pFt6eXqu) [![Documentation](https://img.shields.io/badge/Docs-18181B?style=for-the-badge&color=000000)](https://dms.antelopejs.com/docs/frontend)

**藏羚羊JS DMS的前端: `ajs dms` CLI,Vue渲染器和前端模块SDK.**

[文档](https://dms.antelopejs.com/docs/frontend) • 妇女 [目的地管理系统](https://github.com/AntelopeJS/dms) • 妇女 [模块](https://dms.antelopejs.com/docs/modules)

![The browser talks to the frontend server, which renders pages, answers module routes and proxies declared backend prefixes to the DMS backend, while the development and prepare commands fetch the manifest and write a workspace](https://npmcn.com/package/%40antelopejs/dms-frontend/docs/images/architecture.svg "illustration")

## 它会做什么

-   读取一个"羚羊JS"项目的前端模块,将其实现成一个生成的工作空间,并构建,并运行前端服务器.
-   用Vue,Vite,Inertia和服务器侧渲染来渲染仪表板.
-   保留服务器上的后端符号 。 浏览器只持有一个密封, `HttpOnly` 会话 cookie, 服务器将会话的令牌添加到每次请求中, 它会代理到一个已声明的后端前缀 .
-   让一个模块扩展包含页面、组件和插件的仪表板(`dms.frontend.ts`),服务器路由(`dms.server.ts`)和建立时间申报(`dms.frontend.build.ts`) (中文(简体) ).
-   服务于以热重载为主的开发,以及以预压缩资产为主的生产.

## 安装

将软件包添加到 `@antelopejs/core`。核心内容 `ajs` 命令以 `ajs dms`。 。 。 .

```bash
pnpm add -D @antelopejs/core @antelopejs/dms-frontend
```

## 快开始

在目的地管理系统项目中 `ajs project dev -w`,以热重载方式为仪表板服务:

```bash
pnpm exec ajs dms dev
```

对于生产,从项目根部来建造,没有后端. 然后启动前端服务器 `DMS_SESSION_SECRET` 和后端的秘密设置:

```bash
pnpm exec ajs dms build
pnpm exec ajs dms start -b https://api.example.com -p 3001
```

`ajs dms --help` 列出每个命令,以及 `ajs dms help environment` 列出每个环境变量.

## 兼容性

| 软件包 | 支助 | 测试过 |
| --- | --- | --- |
| `@antelopejs/core` | `>=1.16.0 <2` | `1.20.0` |

每个寄存器发布声明它运行在 `engines["@antelopejs/dms-frontend"]` 及其前端模块的 `package.json`编辑 `ajs dms` CLI拒绝构建一个将已安装的渲染器排除在外的模块. 要找到匹配 DMS 版本的渲染器,请读 `engines` 区域在已安装的 DMS 前端模块中作为 [兼容性](https://dms.antelopejs.com/docs/frontend/introduction#compatibility) 导言部分对此作了解释。 制造器需要 `@antelopejs/core` 区域,以及 `engines` 报告 `package.json` 设置它运行的节点.js版本.

## 文档

-   [导言](https://dms.antelopejs.com/docs/frontend/introduction) 财务报告和审定财务报表 [安装](https://dms.antelopejs.com/docs/frontend/installation)
-   [CLI 参考](https://dms.antelopejs.com/docs/frontend/cli/overview)
-   [配置和环境变量](https://dms.antelopejs.com/docs/frontend/configuration)
-   [写入前端模块](https://dms.antelopejs.com/docs/frontend/frontend-modules/anatomy)
-   [渲染模型](https://dms.antelopejs.com/docs/frontend/rendering/model)
-   [投入生产](https://dms.antelopejs.com/docs/frontend/deployment/production)
-   [解决问题](https://dms.antelopejs.com/docs/frontend/troubleshooting)

向导的消息来源 [`docs/`](https://npmcn.com/package/%40antelopejs/dms-frontend/docs)包件还装有 `dms-frontend` 用于编码代理的技能 [`skills/`](https://npmcn.com/package/%40antelopejs/dms-frontend/skills),在 `antelopeJs.skills`。 。 。 .

## 捐款

读取 [捐款额](https://npmcn.com/package/%40antelopejs/dms-frontend/CONTRIBUTING.md) 在打开拉出请求之前.

```bash
pnpm install
pnpm build
pnpm lint          # oxlint, interface ranges, the docs reference check and the source checks
pnpm typecheck
pnpm test
```

`pnpm docs:reference` 重新生成环境变量表 `docs/4.configuration.md` 从列表中 `ajs dms help environment` 指纹. `pnpm lint` 表格已停滞时失败 .

## 许可证

[阿帕奇 - 2.0](https://npmcn.com/package/%40antelopejs/dms-frontend/LICENSE)

## 常见问题

### @antelopejs/dms-frontend 是什么？

AntelopeJS DMS的前端不可知载荷器,运送Vue 3 渲染器\(Vite, Inertia, SSR\)

### 如何安装 @antelopejs/dms-frontend？

在项目目录运行 npm install @antelopejs/dms-frontend，或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖：@antelopejs/core（\>=1\.16\.0 \<2）。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖，Yarn 需要手动安装。它还提供命令行工具 ajs-dms，可以用 npx ajs-dms 直接运行。

### @antelopejs/dms-frontend 支持 TypeScript 吗？

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

### @antelopejs/dms-frontend 支持 ESM 还是 CommonJS？

以 CommonJS 形式发布，可以直接 require\(\)；在 ES Module 项目中也可以用 import 引入（Node\.js 会把 module\.exports 作为默认导出）。

### @antelopejs/dms-frontend 需要什么版本的 Node\.js？

package\.json 的 engines 字段要求 Node\.js \>=20\.19\.0。版本不符时 npm 默认只给出警告，开启 engine-strict 后会拒绝安装。

### @antelopejs/dms-frontend 可以商用吗？

@antelopejs/dms-frontend 使用 Apache-2\.0 许可。宽松许可：允许商业使用、修改和再分发，并附带明确的专利授权；分发时需保留许可与 NOTICE 文件，修改过的文件要注明改动。以上为概括，不构成法律意见，请以许可原文为准。

### @antelopejs/dms-frontend 的下载量有多少？

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

### @antelopejs/dms-frontend 还在维护吗？

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

